@barefootjs/cli 0.21.0 → 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 +44 -6
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2121,7 +2121,7 @@ function identifierPath(callee) {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
return null;
|
|
2123
2123
|
}
|
|
2124
|
-
var PARSED_EXPR_KINDS, UNSUPPORTED_METHODS, UNSUPPORTED_METHOD_REASONS, LOWERED_ARRAY_METHODS, CALLBACK_METHODS, IMPERATIVE_BLOCK_REASON, CAPTURE_BLOCK_REASON, IMPURE_INLINE_BLOCK_REASON, EVAL_BINARY_OPS, EVAL_UNARY_OPS, EVAL_BUILTIN_IDENTS, EVAL_MATH_METHODS;
|
|
2124
|
+
var PARSED_EXPR_KINDS, ARRAY_METHOD_NAMES, UNSUPPORTED_METHODS, UNSUPPORTED_METHOD_REASONS, LOWERED_ARRAY_METHODS, CALLBACK_METHODS, IMPERATIVE_BLOCK_REASON, CAPTURE_BLOCK_REASON, IMPURE_INLINE_BLOCK_REASON, EVAL_BINARY_OPS, EVAL_UNARY_OPS, EVAL_BUILTIN_IDENTS, EVAL_MATH_METHODS;
|
|
2125
2125
|
var init_expression_parser = __esm({
|
|
2126
2126
|
"../jsx/src/expression-parser.ts"() {
|
|
2127
2127
|
"use strict";
|
|
@@ -2143,6 +2143,32 @@ var init_expression_parser = __esm({
|
|
|
2143
2143
|
"array-method",
|
|
2144
2144
|
"unsupported"
|
|
2145
2145
|
];
|
|
2146
|
+
ARRAY_METHOD_NAMES = [
|
|
2147
|
+
"join",
|
|
2148
|
+
"includes",
|
|
2149
|
+
"indexOf",
|
|
2150
|
+
"lastIndexOf",
|
|
2151
|
+
"at",
|
|
2152
|
+
"concat",
|
|
2153
|
+
"slice",
|
|
2154
|
+
"reverse",
|
|
2155
|
+
"toReversed",
|
|
2156
|
+
"toLowerCase",
|
|
2157
|
+
"toUpperCase",
|
|
2158
|
+
"trim",
|
|
2159
|
+
"trimStart",
|
|
2160
|
+
"trimEnd",
|
|
2161
|
+
"toFixed",
|
|
2162
|
+
"split",
|
|
2163
|
+
"startsWith",
|
|
2164
|
+
"endsWith",
|
|
2165
|
+
"replace",
|
|
2166
|
+
"replaceAll",
|
|
2167
|
+
"repeat",
|
|
2168
|
+
"padStart",
|
|
2169
|
+
"padEnd",
|
|
2170
|
+
"flat"
|
|
2171
|
+
];
|
|
2146
2172
|
UNSUPPORTED_METHODS = /* @__PURE__ */ new Set([
|
|
2147
2173
|
// Higher-order array methods. Seven of these (`filter`, `every`,
|
|
2148
2174
|
// `some`, `find`, `findIndex`, `findLast`, `findLastIndex`) are
|
|
@@ -10969,6 +10995,12 @@ function getAttributeValue(attr, ctx2) {
|
|
|
10969
10995
|
return AttrValueOf.template(parts);
|
|
10970
10996
|
}
|
|
10971
10997
|
}
|
|
10998
|
+
if (ts11.isElementAccessExpression(expr) && !ts11.isStringLiteralLike(expr.argumentExpression) && !ts11.isNumericLiteral(expr.argumentExpression)) {
|
|
10999
|
+
const parts = tryResolveTemplateSpanFromConst(expr, ctx2);
|
|
11000
|
+
if (parts) {
|
|
11001
|
+
return AttrValueOf.template(parts);
|
|
11002
|
+
}
|
|
11003
|
+
}
|
|
10972
11004
|
if (ts11.isIdentifier(expr)) {
|
|
10973
11005
|
const resolved = tryResolveIdentifierAsTemplateLiteral(expr, ctx2);
|
|
10974
11006
|
if (resolved) {
|
|
@@ -24616,6 +24648,7 @@ var init_debug_profile = __esm({
|
|
|
24616
24648
|
// ../jsx/src/index.ts
|
|
24617
24649
|
var src_exports = {};
|
|
24618
24650
|
__export(src_exports, {
|
|
24651
|
+
ARRAY_METHOD_NAMES: () => ARRAY_METHOD_NAMES,
|
|
24619
24652
|
AttrValueOf: () => AttrValueOf,
|
|
24620
24653
|
BOOLEAN_ATTRS: () => BOOLEAN_ATTRS,
|
|
24621
24654
|
BROWSER_ONLY_CLIENT_APIS: () => BROWSER_ONLY_CLIENT_APIS,
|
|
@@ -25685,12 +25718,15 @@ import { build as esbuildBuild } from "esbuild";
|
|
|
25685
25718
|
function isBarefootClientSpecifier(spec) {
|
|
25686
25719
|
return spec === "@barefootjs/client" || spec.startsWith("@barefootjs/client/");
|
|
25687
25720
|
}
|
|
25721
|
+
function isEmittedRuntimeSpecifier(spec) {
|
|
25722
|
+
return isBarefootClientSpecifier(spec) || EMITTED_RUNTIME_REL.test(spec);
|
|
25723
|
+
}
|
|
25688
25724
|
function emptyCollection() {
|
|
25689
25725
|
return { names: /* @__PURE__ */ new Set(), unsafe: false, reasons: [] };
|
|
25690
25726
|
}
|
|
25691
25727
|
function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
25692
25728
|
const result2 = emptyCollection();
|
|
25693
|
-
if (!code.includes("@barefootjs/client")) return result2;
|
|
25729
|
+
if (!code.includes("@barefootjs/client") && !code.includes("barefoot.js")) return result2;
|
|
25694
25730
|
let sourceFile;
|
|
25695
25731
|
try {
|
|
25696
25732
|
sourceFile = ts24.createSourceFile(
|
|
@@ -25709,7 +25745,7 @@ function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
|
25709
25745
|
const visit3 = (node) => {
|
|
25710
25746
|
if (ts24.isImportDeclaration(node)) {
|
|
25711
25747
|
const spec = node.moduleSpecifier;
|
|
25712
|
-
if (ts24.isStringLiteral(spec) &&
|
|
25748
|
+
if (ts24.isStringLiteral(spec) && isEmittedRuntimeSpecifier(spec.text)) {
|
|
25713
25749
|
const clause = node.importClause;
|
|
25714
25750
|
if (!clause) {
|
|
25715
25751
|
} else if (clause.isTypeOnly) {
|
|
@@ -25733,7 +25769,7 @@ function collectUsedRuntimeExports(code, sourceLabel = "<input>") {
|
|
|
25733
25769
|
}
|
|
25734
25770
|
} else if (ts24.isCallExpression(node) && node.expression.kind === ts24.SyntaxKind.ImportKeyword) {
|
|
25735
25771
|
const arg = node.arguments[0];
|
|
25736
|
-
if (arg && ts24.isStringLiteral(arg) &&
|
|
25772
|
+
if (arg && ts24.isStringLiteral(arg) && isEmittedRuntimeSpecifier(arg.text)) {
|
|
25737
25773
|
result2.unsafe = true;
|
|
25738
25774
|
result2.reasons.push(`dynamic import("${arg.text}") in ${sourceLabel}`);
|
|
25739
25775
|
}
|
|
@@ -25792,10 +25828,11 @@ async function buildRuntimeBundle(opts) {
|
|
|
25792
25828
|
}
|
|
25793
25829
|
return out.text;
|
|
25794
25830
|
}
|
|
25795
|
-
var ALWAYS_KEEP_RUNTIME_EXPORTS;
|
|
25831
|
+
var EMITTED_RUNTIME_REL, ALWAYS_KEEP_RUNTIME_EXPORTS;
|
|
25796
25832
|
var init_runtime_treeshake = __esm({
|
|
25797
25833
|
"src/lib/runtime-treeshake.ts"() {
|
|
25798
25834
|
"use strict";
|
|
25835
|
+
EMITTED_RUNTIME_REL = /^\.\.?\/(?:[^'"\n]*\/)?barefoot\.js$/;
|
|
25799
25836
|
ALWAYS_KEEP_RUNTIME_EXPORTS = [
|
|
25800
25837
|
"render",
|
|
25801
25838
|
"hydrate",
|
|
@@ -30365,7 +30402,8 @@ export default createConfig({
|
|
|
30365
30402
|
entries: [
|
|
30366
30403
|
"public/components/",
|
|
30367
30404
|
"public/.buildcache.json",
|
|
30368
|
-
"public/.bfemit.json"
|
|
30405
|
+
"public/.bfemit.json",
|
|
30406
|
+
"public/.dev/"
|
|
30369
30407
|
]
|
|
30370
30408
|
},
|
|
30371
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"
|