Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"printWidth": 100,
"tabWidth": 4,
"useTabs": true,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"vueIndentScriptAndStyle": true,
"singleAttributePerLine": false,
"quoteProps": "as-needed",
"bracketSameLine": true
}

8 changes: 4 additions & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 100
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 100
}
6 changes: 0 additions & 6 deletions .vscode/extensions.json

This file was deleted.

57 changes: 30 additions & 27 deletions Issues.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
OSH JS Issues
---
## OSH JS Issues

1. web worker imports

- instead of importing DataSourceWorker.worker.js, the import should happen as the worker is created
```
console.log('Worker props ARGS', properties);

let workerUrl;
try {
workerUrl = new URL('./worker/DataSource.worker.js', import.meta.url);
console.log('Worker URL:', workerUrl);
} catch (e) {
console.error('Failed to create worker URL:', e);
}

const worker = new Worker(workerUrl, { type: 'module' });
const extWorker = new WorkerExt(worker);
console.log('Worker created:', extWorker);
return extWorker;
```

```
console.log('Worker props ARGS', properties);

let workerUrl;
try {
workerUrl = new URL('./worker/DataSource.worker.js', import.meta.url);
console.log('Worker URL:', workerUrl);
} catch (e) {
console.error('Failed to create worker URL:', e);
}

const worker = new Worker(workerUrl, { type: 'module' });
const extWorker = new WorkerExt(worker);
console.log('Worker created:', extWorker);
return extWorker;
```

- Same for FFMPEG
```
// this.decodeWorker = new DecodeWorker();
let decodeWorkerUrl = new URL('./workers/ffmpeg.decode.video.worker.js', import.meta.url);

this.decodeWorker = new Worker(decodeWorkerUrl, {type: 'module'});
```

```
// this.decodeWorker = new DecodeWorker();
let decodeWorkerUrl = new URL('./workers/ffmpeg.decode.video.worker.js', import.meta.url);

this.decodeWorker = new Worker(decodeWorkerUrl, {type: 'module'});
```

2. import statements
- there is an issue where an `assert` named function is imported, but it does not exist. This many not be the case in
3.0.0
- there is an issue where an `assert` named function is imported, but it does not exist. This many not be the case in
3.0.0
3. Cesium import
- ` createDefaultImageryProviderViewModels,` doesn't exist in certain versions of Cesium and appears unused.
4. LeafletView unused 'assert' import
4. LeafletView unused 'assert' import
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ change the names as you see fit.
# OAuth Integration

In order for client authentication via Open Id Connect (OIDC) it is important to edit the values in
```.env.development``` for development and local testing, do not commit changes to this file.
`.env.development` for development and local testing, do not commit changes to this file.

Meanwhile, ```.env``` contains the template parameter names and ```.env.production``` should be changed only by CI/CD
pipeline to not commit any secrets.
Meanwhile, `.env` contains the template parameter names and `.env.production` should be changed only by CI/CD
pipeline to not commit any secrets.

## Usages

- ```.env.local``` :
- Purpose: Developer-specific overrides, regardless of mode.
- Loaded in all modes: development, production, test, etc.
- Use for: Secrets or personal tweaks (e.g., API keys, local ports).
- Should be in .gitignore: Never committed to version control.
- `.env.local` :

- Purpose: Developer-specific overrides, regardless of mode.
- Loaded in all modes: development, production, test, etc.
- Use for: Secrets or personal tweaks (e.g., API keys, local ports).
- Should be in .gitignore: Never committed to version control.

- ```.env.development``` :
- Purpose: Environment-specific configuration for development mode.
- Loaded when: You run your app in development (e.g., npm run dev or vite --mode development).
- Use for: Settings that apply to all developers during development.
- `.env.development` :

- Purpose: Environment-specific configuration for development mode.
- Loaded when: You run your app in development (e.g., npm run dev or vite --mode development).
- Use for: Settings that apply to all developers during development.

- ```.env.production``` :
- Holds production-only values like API endpoints, feature flags, and analytics keys.
- Used when you build or run your app in production mode

- `.env.production` :
- Holds production-only values like API endpoints, feature flags, and analytics keys.
- Used when you build or run your app in production mode

## Load Order (Vite/Webpack)

When loading environment variables, the order is:

| File | Purpose | Loaded When | Committed? |
|--------------------------|----------------------------|--------------------|------------|
| `.env` | Shared defaults | Always | ✅ Yes |
| `.env.development` | Dev-specific config | Dev mode only | ✅ Yes |
| `.env.local` | Personal overrides | Always | ❌ No |
| `.env.development.local` | Personal dev overrides | Dev mode only | ❌ No |
| File | Purpose | Loaded When | Committed? |
| ------------------------ | ---------------------- | ------------- | ---------- |
| `.env` | Shared defaults | Always | ✅ Yes |
| `.env.development` | Dev-specific config | Dev mode only | ✅ Yes |
| `.env.local` | Personal overrides | Always | ❌ No |
| `.env.development.local` | Personal dev overrides | Dev mode only | ❌ No |

Later files override earlier ones. So .env.development.local overrides .env.development.
Loading
Loading