@barefootjs/cli 0.21.2 → 0.21.3
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 +10 -5
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -25718,12 +25718,15 @@ import { build as esbuildBuild } from "esbuild";
|
|
|
25718
25718
|
function isBarefootClientSpecifier(spec) {
|
|
25719
25719
|
return spec === "@barefootjs/client" || spec.startsWith("@barefootjs/client/");
|
|
25720
25720
|
}
|
|
25721
|
+
function isEmittedRuntimeSpecifier(spec) {
|
|
25722
|
+
return isBarefootClientSpecifier(spec) || EMITTED_RUNTIME_REL.test(spec);
|
|
25723
|
+
}
|
|
25721
25724
|
function emptyCollection() {
|
|
25722
25725
|
return { names: /* @__PURE__ */ new Set(), unsafe: false, reasons: [] };
|
|
25723
25726
|
}
|
|
25724
25727
|
function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
25725
25728
|
const result2 = emptyCollection();
|
|
25726
|
-
if (!code.includes("@barefootjs/client")) return result2;
|
|
25729
|
+
if (!code.includes("@barefootjs/client") && !code.includes("barefoot.js")) return result2;
|
|
25727
25730
|
let sourceFile;
|
|
25728
25731
|
try {
|
|
25729
25732
|
sourceFile = ts24.createSourceFile(
|
|
@@ -25742,7 +25745,7 @@ function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
|
25742
25745
|
const visit3 = (node) => {
|
|
25743
25746
|
if (ts24.isImportDeclaration(node)) {
|
|
25744
25747
|
const spec = node.moduleSpecifier;
|
|
25745
|
-
if (ts24.isStringLiteral(spec) &&
|
|
25748
|
+
if (ts24.isStringLiteral(spec) && isEmittedRuntimeSpecifier(spec.text)) {
|
|
25746
25749
|
const clause = node.importClause;
|
|
25747
25750
|
if (!clause) {
|
|
25748
25751
|
} else if (clause.isTypeOnly) {
|
|
@@ -25766,7 +25769,7 @@ function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
|
25766
25769
|
}
|
|
25767
25770
|
} else if (ts24.isCallExpression(node) && node.expression.kind === ts24.SyntaxKind.ImportKeyword) {
|
|
25768
25771
|
const arg = node.arguments[0];
|
|
25769
|
-
if (arg && ts24.isStringLiteral(arg) &&
|
|
25772
|
+
if (arg && ts24.isStringLiteral(arg) && isEmittedRuntimeSpecifier(arg.text)) {
|
|
25770
25773
|
result2.unsafe = true;
|
|
25771
25774
|
result2.reasons.push(`dynamic import("${arg.text}") in ${sourceLabel}`);
|
|
25772
25775
|
}
|
|
@@ -25825,10 +25828,11 @@ async function buildRuntimeBundle(opts) {
|
|
|
25825
25828
|
}
|
|
25826
25829
|
return out.text;
|
|
25827
25830
|
}
|
|
25828
|
-
var ALWAYS_KEEP_RUNTIME_EXPORTS;
|
|
25831
|
+
var EMITTED_RUNTIME_REL, ALWAYS_KEEP_RUNTIME_EXPORTS;
|
|
25829
25832
|
var init_runtime_treeshake = __esm({
|
|
25830
25833
|
"src/lib/runtime-treeshake.ts"() {
|
|
25831
25834
|
"use strict";
|
|
25835
|
+
EMITTED_RUNTIME_REL = /^\.\.?\/(?:[^'"\n]*\/)?barefoot\.js$/;
|
|
25832
25836
|
ALWAYS_KEEP_RUNTIME_EXPORTS = [
|
|
25833
25837
|
"render",
|
|
25834
25838
|
"hydrate",
|
|
@@ -30398,7 +30402,8 @@ export default createConfig({
|
|
|
30398
30402
|
entries: [
|
|
30399
30403
|
"public/components/",
|
|
30400
30404
|
"public/.buildcache.json",
|
|
30401
|
-
"public/.bfemit.json"
|
|
30405
|
+
"public/.bfemit.json",
|
|
30406
|
+
"public/.dev/"
|
|
30402
30407
|
]
|
|
30403
30408
|
},
|
|
30404
30409
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/cli",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.3",
|
|
4
4
|
"description": "CLI for agent-driven UI component discovery and scaffolding",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"esbuild": "^0.25.0",
|
|
31
31
|
"typescript": "^5.0.0",
|
|
32
|
-
"@barefootjs/client": "0.21.
|
|
33
|
-
"@barefootjs/shared": "0.21.
|
|
32
|
+
"@barefootjs/client": "0.21.3",
|
|
33
|
+
"@barefootjs/shared": "0.21.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@barefootjs/jsx": "0.21.
|
|
36
|
+
"@barefootjs/jsx": "0.21.3",
|
|
37
37
|
"@types/node": "^22.0.0",
|
|
38
38
|
"@happy-dom/global-registrator": "^20.0.11",
|
|
39
39
|
"happy-dom": "^20.0.11"
|