@arcote.tech/arc-cli 0.7.12 → 0.7.13
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/index.js +22 -3
- package/package.json +9 -9
- package/src/builder/module-builder.ts +31 -1
package/dist/index.js
CHANGED
|
@@ -19330,7 +19330,11 @@ var init_dist = __esm(() => {
|
|
|
19330
19330
|
if (!adapters.commandWire) {
|
|
19331
19331
|
throw new Error(`Command "${this.data.name}" has no handler and no commandWire adapter available for remote execution`);
|
|
19332
19332
|
}
|
|
19333
|
-
|
|
19333
|
+
const wireAuth = adapters.scope ? {
|
|
19334
|
+
scope: adapters.scope.scopeName,
|
|
19335
|
+
token: adapters.scope.getToken()
|
|
19336
|
+
} : undefined;
|
|
19337
|
+
return await adapters.commandWire.executeCommand(this.data.name, params, wireAuth);
|
|
19334
19338
|
};
|
|
19335
19339
|
return Object.assign(executeFunc, { params: this.data.params });
|
|
19336
19340
|
}
|
|
@@ -25153,7 +25157,11 @@ var init_dist2 = __esm(() => {
|
|
|
25153
25157
|
if (!adapters.commandWire) {
|
|
25154
25158
|
throw new Error(`Command "${this.data.name}" has no handler and no commandWire adapter available for remote execution`);
|
|
25155
25159
|
}
|
|
25156
|
-
|
|
25160
|
+
const wireAuth = adapters.scope ? {
|
|
25161
|
+
scope: adapters.scope.scopeName,
|
|
25162
|
+
token: adapters.scope.getToken()
|
|
25163
|
+
} : undefined;
|
|
25164
|
+
return await adapters.commandWire.executeCommand(this.data.name, params, wireAuth);
|
|
25157
25165
|
};
|
|
25158
25166
|
return Object.assign(executeFunc, { params: this.data.params });
|
|
25159
25167
|
}
|
|
@@ -34710,6 +34718,17 @@ function singleReactPlugin(rootDir) {
|
|
|
34710
34718
|
}
|
|
34711
34719
|
};
|
|
34712
34720
|
}
|
|
34721
|
+
function serverExternalsPlugin() {
|
|
34722
|
+
return {
|
|
34723
|
+
name: "server-externals",
|
|
34724
|
+
setup(build2) {
|
|
34725
|
+
build2.onResolve({ filter: /^(@aws-sdk|@smithy)\// }, (args) => ({
|
|
34726
|
+
path: args.path,
|
|
34727
|
+
external: true
|
|
34728
|
+
}));
|
|
34729
|
+
}
|
|
34730
|
+
};
|
|
34731
|
+
}
|
|
34713
34732
|
function jsxDevShimPlugin() {
|
|
34714
34733
|
return {
|
|
34715
34734
|
name: "jsx-dev-runtime-shim",
|
|
@@ -34835,7 +34854,7 @@ async function buildContextClient(pkg, rootDir, client, cache, noCache) {
|
|
|
34835
34854
|
format: "esm",
|
|
34836
34855
|
naming: "index.[ext]",
|
|
34837
34856
|
external: externals,
|
|
34838
|
-
plugins: [jsxDevShimPlugin()],
|
|
34857
|
+
plugins: isBrowser2 ? [jsxDevShimPlugin()] : [jsxDevShimPlugin(), serverExternalsPlugin()],
|
|
34839
34858
|
define: client.defines
|
|
34840
34859
|
});
|
|
34841
34860
|
if (!result.success) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.13",
|
|
4
4
|
"description": "CLI tool for Arc framework",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,13 +12,13 @@
|
|
|
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 --external '@opentelemetry/*' && chmod +x dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@arcote.tech/arc": "^0.7.
|
|
16
|
-
"@arcote.tech/arc-ds": "^0.7.
|
|
17
|
-
"@arcote.tech/arc-react": "^0.7.
|
|
18
|
-
"@arcote.tech/arc-host": "^0.7.
|
|
19
|
-
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.
|
|
20
|
-
"@arcote.tech/arc-adapter-db-postgres": "^0.7.
|
|
21
|
-
"@arcote.tech/arc-otel": "^0.7.
|
|
15
|
+
"@arcote.tech/arc": "^0.7.13",
|
|
16
|
+
"@arcote.tech/arc-ds": "^0.7.13",
|
|
17
|
+
"@arcote.tech/arc-react": "^0.7.13",
|
|
18
|
+
"@arcote.tech/arc-host": "^0.7.13",
|
|
19
|
+
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.13",
|
|
20
|
+
"@arcote.tech/arc-adapter-db-postgres": "^0.7.13",
|
|
21
|
+
"@arcote.tech/arc-otel": "^0.7.13",
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
23
|
"@opentelemetry/api-logs": "^0.57.0",
|
|
24
24
|
"@opentelemetry/core": "^1.30.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@opentelemetry/sdk-trace-base": "^1.30.0",
|
|
32
32
|
"@opentelemetry/sdk-trace-node": "^1.30.0",
|
|
33
33
|
"@opentelemetry/semantic-conventions": "^1.27.0",
|
|
34
|
-
"@arcote.tech/platform": "^0.7.
|
|
34
|
+
"@arcote.tech/platform": "^0.7.13",
|
|
35
35
|
"@clack/prompts": "^0.9.0",
|
|
36
36
|
"commander": "^11.1.0",
|
|
37
37
|
"chokidar": "^3.5.3",
|
|
@@ -97,6 +97,34 @@ function singleReactPlugin(rootDir: string): import("bun").BunPlugin {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Marks heavy server-side packages as external. Bun.build's `external: string[]`
|
|
102
|
+
* accepts only literal package names — wildcard like `@aws-sdk/*` is treated
|
|
103
|
+
* verbatim and doesn't match anything. This plugin uses `onResolve` regex to
|
|
104
|
+
* catch any subpackage matching the prefix and marks it external.
|
|
105
|
+
*
|
|
106
|
+
* Removes ~10-15 MB of AWS SDK v3 from every server bundle that transitively
|
|
107
|
+
* pulls `@arcote.tech/arc-files` (e.g. `@ndt/content` was 340 MB before).
|
|
108
|
+
*
|
|
109
|
+
* Runtime requirement: each external package must be available in
|
|
110
|
+
* `node_modules/` at server startup (Bun resolves bare specifiers). Consumer
|
|
111
|
+
* apps declare them in root `package.json` dependencies.
|
|
112
|
+
*/
|
|
113
|
+
function serverExternalsPlugin(): import("bun").BunPlugin {
|
|
114
|
+
return {
|
|
115
|
+
name: "server-externals",
|
|
116
|
+
setup(build) {
|
|
117
|
+
// @aws-sdk/* and @smithy/* — full AWS SDK v3 + low-level signing/HTTP
|
|
118
|
+
// primitives it depends on. Add more prefixes here if other heavy
|
|
119
|
+
// server-only libs appear (e.g. `@google-cloud/*`).
|
|
120
|
+
build.onResolve({ filter: /^(@aws-sdk|@smithy)\// }, (args) => ({
|
|
121
|
+
path: args.path,
|
|
122
|
+
external: true,
|
|
123
|
+
}));
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
100
128
|
function jsxDevShimPlugin(): import("bun").BunPlugin {
|
|
101
129
|
return {
|
|
102
130
|
name: "jsx-dev-runtime-shim",
|
|
@@ -311,7 +339,9 @@ async function buildContextClient(
|
|
|
311
339
|
format: "esm",
|
|
312
340
|
naming: "index.[ext]",
|
|
313
341
|
external: externals,
|
|
314
|
-
plugins:
|
|
342
|
+
plugins: isBrowser
|
|
343
|
+
? [jsxDevShimPlugin()]
|
|
344
|
+
: [jsxDevShimPlugin(), serverExternalsPlugin()],
|
|
315
345
|
define: client.defines,
|
|
316
346
|
});
|
|
317
347
|
|