@mosetta/cli 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/package.json +5 -5
- package/src/host/nodeFileSystem.mjs +3 -45
- package/src/scanner.mjs +6 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @mosetta/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [eea103d]
|
|
8
|
+
- @mosetta/runtime@0.0.11
|
|
9
|
+
- @mosetta/build@0.0.11
|
|
10
|
+
- @mosetta/server@0.0.11
|
|
11
|
+
- @mosetta/stores@0.0.11
|
|
12
|
+
|
|
13
|
+
## 0.0.10
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 95b93d5: The build's node host is an entry of the build: `@mosetta/build/node` gives the real file system,
|
|
18
|
+
the framework's files resolved from the installed build, and `buildDirectory(root, …)` — the build
|
|
19
|
+
of a palette that lies on disk with its dependencies installed, by the build installed for it. The
|
|
20
|
+
CLI builds with it, and so does a platform's build container: a palette is built by the framework
|
|
21
|
+
version its lock names. `systemjs`, whose files the build mixes into a page, is a dependency of the
|
|
22
|
+
build now, not of the CLI.
|
|
23
|
+
- Updated dependencies [95b93d5]
|
|
24
|
+
- @mosetta/build@0.0.10
|
|
25
|
+
- @mosetta/stores@0.0.10
|
|
26
|
+
- @mosetta/runtime@0.0.10
|
|
27
|
+
- @mosetta/server@0.0.10
|
|
28
|
+
|
|
3
29
|
## 0.0.9
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosetta/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "mosetta CLI: development server (single port, live reload, type-check companion), building a deployable tile palette and publishing it.",
|
|
6
6
|
"type": "module",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"esbuild-wasm": "0.24.2",
|
|
14
14
|
"systemjs": "^6.15.1",
|
|
15
15
|
"workerd": "^1.20260630.1",
|
|
16
|
-
"@mosetta/build": "0.0.
|
|
17
|
-
"@mosetta/
|
|
18
|
-
"@mosetta/
|
|
19
|
-
"@mosetta/
|
|
16
|
+
"@mosetta/build": "0.0.11",
|
|
17
|
+
"@mosetta/stores": "0.0.11",
|
|
18
|
+
"@mosetta/runtime": "0.0.11",
|
|
19
|
+
"@mosetta/server": "0.0.11"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Node implementation of the file port: the real FS, read-only.
|
|
6
|
-
*
|
|
7
|
-
* Resolution no longer lives here: `createRequire` contexts died together with the `resolve`
|
|
8
|
-
* method — packages are resolved by `PackagesResolver` from the scanner catalog, identically in
|
|
9
|
-
* all environments.
|
|
10
|
-
*/
|
|
11
|
-
export class NodeFileSystem extends FileSystem {
|
|
12
|
-
readFile(file, encoding = null) {
|
|
13
|
-
return encoding ? fs.readFileSync(file, encoding) : fs.readFileSync(file);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
exists(file) {
|
|
17
|
-
return fs.existsSync(file);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
readDir(dir) {
|
|
21
|
-
return fs.readdirSync(dir, { withFileTypes: true })
|
|
22
|
-
.map((e) => ({ name: e.name, isDirectory: e.isDirectory() }));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
isDirectory(dir) {
|
|
26
|
-
try {
|
|
27
|
-
return fs.statSync(dir).isDirectory();
|
|
28
|
-
} catch {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
realPath(file) {
|
|
34
|
-
return fs.realpathSync(file);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
mtimeMs(file) {
|
|
38
|
-
try {
|
|
39
|
-
return fs.statSync(file).mtimeMs;
|
|
40
|
-
} catch {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
1
|
+
// The node file port lives with the build's node host (@mosetta/build/node), shared with the
|
|
2
|
+
// platform's build container; kept here under its old path for the CLI's own imports.
|
|
3
|
+
export { NodeFileSystem } from '@mosetta/build/node';
|
package/src/scanner.mjs
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* The package-catalog scanner itself is portable and lives in `@mosetta/build/scanner`: it
|
|
9
|
-
* takes the file port and uses only sources and pnpm-lock.yaml from it — exactly what the
|
|
10
|
-
* scanner isolate will have. Only `createRequire` remains here, because resolving the tool's
|
|
11
|
-
* installation is an environment capability; in the isolate a pre-seeded map in the plan
|
|
12
|
-
* replaces it.
|
|
13
|
-
*/
|
|
14
|
-
const cliRequire = createRequire(import.meta.url);
|
|
15
|
-
|
|
16
|
-
/** File for a framework specifier from the CLI installation (for frameworkDir in harnesses). */
|
|
17
|
-
export function frameworkFileOf(specifier) {
|
|
18
|
-
return cliRequire.resolve(specifier);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** `catalog.framework`: ready answers for the FRAMEWORK_RESOLUTIONS list. */
|
|
22
|
-
export function frameworkResolutions() {
|
|
23
|
-
const framework = {};
|
|
24
|
-
for (const spec of FRAMEWORK_RESOLUTIONS) framework[spec] = cliRequire.resolve(spec);
|
|
25
|
-
return framework;
|
|
26
|
-
}
|
|
1
|
+
// The node side of the scanner — ONLY framework resolutions: the files the build mixes in by
|
|
2
|
+
// itself (systemjs, the runtime's bootstrap), resolved from the installation of @mosetta/build —
|
|
3
|
+
// the build's node host (@mosetta/build/node), which the platform's build container uses too.
|
|
4
|
+
//
|
|
5
|
+
// The package-catalog scanner itself is portable and lives in `@mosetta/build/scanner`.
|
|
6
|
+
export { frameworkFileOf, frameworkResolutions } from '@mosetta/build/node';
|