@arcote.tech/arc-cli 0.4.9 → 0.5.0
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/dist/commands/ui/app/src/App.tsx +1 -1
- package/dist/index.js +1404 -830
- package/package.json +7 -1
- package/src/platform/server.ts +1 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "CLI tool for Arc framework",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
"build": "bun build --target=bun ./src/index.ts --outdir=dist --external @arcote.tech/arc --external @arcote.tech/arc-ds --external @arcote.tech/arc-react --external @arcote.tech/platform && chmod +x dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@arcote.tech/arc": "^0.5.0",
|
|
16
|
+
"@arcote.tech/arc-ds": "^0.5.0",
|
|
17
|
+
"@arcote.tech/arc-react": "^0.5.0",
|
|
18
|
+
"@arcote.tech/arc-host": "^0.5.0",
|
|
19
|
+
"@arcote.tech/arc-adapter-db-sqlite": "^0.5.0",
|
|
20
|
+
"@arcote.tech/platform": "^0.5.0",
|
|
15
21
|
"commander": "^11.1.0",
|
|
16
22
|
"chokidar": "^3.5.3",
|
|
17
23
|
"glob": "^10.3.10",
|
package/src/platform/server.ts
CHANGED
|
@@ -215,10 +215,6 @@ async function filterManifestForTokens(
|
|
|
215
215
|
): Promise<BuildManifest> {
|
|
216
216
|
const filtered: ModuleEntry[] = [];
|
|
217
217
|
|
|
218
|
-
console.log(`[arc:modules] Filtering ${manifest.modules.length} modules with ${tokenPayloads.length} token(s):`,
|
|
219
|
-
tokenPayloads.map(t => `${t.tokenType}(${JSON.stringify(t.params)})`).join(", ") || "none");
|
|
220
|
-
console.log(`[arc:modules] Protected modules:`, [...moduleAccessMap.keys()].join(", ") || "none");
|
|
221
|
-
|
|
222
218
|
for (const mod of manifest.modules) {
|
|
223
219
|
const access = moduleAccessMap.get(mod.name);
|
|
224
220
|
|
|
@@ -227,10 +223,7 @@ async function filterManifestForTokens(
|
|
|
227
223
|
continue;
|
|
228
224
|
}
|
|
229
225
|
|
|
230
|
-
if (tokenPayloads.length === 0)
|
|
231
|
-
console.log(`[arc:modules] ${mod.name}: SKIP (no tokens)`);
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
226
|
+
if (tokenPayloads.length === 0) continue;
|
|
234
227
|
|
|
235
228
|
let granted = false;
|
|
236
229
|
for (const rule of access.rules) {
|
|
@@ -239,10 +232,7 @@ async function filterManifestForTokens(
|
|
|
239
232
|
);
|
|
240
233
|
if (matching) {
|
|
241
234
|
granted = rule.check ? await rule.check(matching) : true;
|
|
242
|
-
console.log(`[arc:modules] ${mod.name}: rule ${rule.token.name} matched token, check=${granted}`);
|
|
243
235
|
if (granted) break;
|
|
244
|
-
} else {
|
|
245
|
-
console.log(`[arc:modules] ${mod.name}: rule needs "${rule.token.name}", no matching token (have: ${tokenPayloads.map(t => t.tokenType).join(",")})`);
|
|
246
236
|
}
|
|
247
237
|
}
|
|
248
238
|
|
|
@@ -250,8 +240,6 @@ async function filterManifestForTokens(
|
|
|
250
240
|
filtered.push({ ...mod, url: signModuleUrl(mod.file) } as any);
|
|
251
241
|
}
|
|
252
242
|
}
|
|
253
|
-
|
|
254
|
-
console.log(`[arc:modules] Result: ${filtered.map(m => m.name).join(", ")}`);
|
|
255
243
|
return { modules: filtered, buildTime: manifest.buildTime };
|
|
256
244
|
}
|
|
257
245
|
|