@tackup/cli 0.0.0 → 0.1.1-exp.pr144.g5661267
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/LICENSE +21 -0
- package/README.md +16 -1
- package/dist/builtins/extensions/docs/guides/day-two.md +3 -0
- package/dist/builtins/extensions/docs/guides/onboarding-2.md +3 -0
- package/dist/builtins/extensions/docs/guides/onboarding-3.md +3 -0
- package/dist/builtins/extensions/docs/skills/use-tack-docs/SKILL.md +67 -0
- package/dist/builtins/extensions/docs/skills/use-tack-docs/references/declare-docs.md +71 -0
- package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-in-profiles.md +25 -0
- package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-maintenance.md +35 -0
- package/dist/builtins/extensions/docs/skills/use-tack-docs/references/review.md +34 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/SKILL.md +66 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figure-components.md +20 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/architecture-map.md +86 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/chart.md +52 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/figure.md +79 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/file-tree.md +74 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/schema.md +116 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/system.md +81 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/walkthrough.md +45 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/page-components.md +82 -0
- package/dist/builtins/extensions/docs/skills/write-reader-figures/references/rules.md +27 -0
- package/dist/builtins/extensions/docs/tack.yaml +10 -0
- package/dist/builtins/extensions/scripts/guides/day-two.md +3 -0
- package/dist/builtins/extensions/scripts/guides/onboarding-2.md +3 -0
- package/dist/builtins/extensions/scripts/skills/author-tack-scripts/SKILL.md +48 -0
- package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/run-scripts.md +23 -0
- package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/script-api.md +76 -0
- package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-profiles.md +35 -0
- package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-sources.md +56 -0
- package/dist/builtins/extensions/scripts/tack.yaml +10 -0
- package/dist/builtins/skills/author-tack-profiles/SKILL.md +68 -0
- package/dist/builtins/skills/author-tack-profiles/references/apply.md +33 -0
- package/dist/builtins/skills/author-tack-profiles/references/bundles.md +59 -0
- package/dist/builtins/skills/author-tack-profiles/references/copy-workflows.md +46 -0
- package/dist/builtins/skills/manage-tack-sources/SKILL.md +75 -0
- package/dist/builtins/skills/manage-tack-sources/references/catalog-issues.md +38 -0
- package/dist/builtins/skills/manage-tack-sources/references/metadata.md +35 -0
- package/dist/builtins/skills/manage-tack-sources/references/tack-yaml.md +114 -0
- package/dist/builtins/skills/manage-tack-sources/references/worked-source.md +126 -0
- package/dist/builtins/skills/prepare-tack-checkout/SKILL.md +52 -0
- package/dist/builtins/skills/use-tack/SKILL.md +65 -0
- package/dist/builtins/skills/use-tack/references/agent-instructions.md +38 -0
- package/dist/builtins/skills/use-tack/references/day-two.md +35 -0
- package/dist/builtins/skills/use-tack/references/explore.md +13 -0
- package/dist/builtins/skills/use-tack/references/imports.md +30 -0
- package/dist/builtins/skills/use-tack/references/maintenance.md +51 -0
- package/dist/builtins/skills/use-tack/references/onboarding-2.md +41 -0
- package/dist/builtins/skills/use-tack/references/onboarding-3.md +29 -0
- package/dist/builtins/skills/use-tack/references/onboarding.md +54 -0
- package/dist/builtins/skills/use-tack/references/output.md +15 -0
- package/dist/builtins/skills/use-tack/references/selection.md +61 -0
- package/dist/builtins/skills/use-tack/references/setup.md +69 -0
- package/dist/builtins/tack.yaml +10 -0
- package/dist/bundle-support-C7OD5JEG.js +16 -0
- package/dist/chunk-2RUJGM5D.js +56 -0
- package/dist/chunk-3KGEOW4B.js +225 -0
- package/dist/chunk-BDOOV5W7.js +26 -0
- package/dist/chunk-C3K3AFJD.js +16 -0
- package/dist/chunk-E2SJQHKZ.js +281 -0
- package/dist/chunk-EOACX6VI.js +12401 -0
- package/dist/chunk-I25CGFRW.js +36671 -0
- package/dist/chunk-QW47O677.js +162 -0
- package/dist/chunk-QXSQ5MEX.js +28 -0
- package/dist/chunk-RZQCGAJF.js +5733 -0
- package/dist/chunk-SMY7ZPQQ.js +52 -0
- package/dist/chunk-VV2YFWGB.js +1791 -0
- package/dist/chunk-W76JFI2G.js +18013 -0
- package/dist/chunk-XTWP3LBL.js +1017 -0
- package/dist/chunk-ZTKVYMVR.js +92 -0
- package/dist/corpus-effects-IKUFX5HQ.js +12069 -0
- package/dist/elk.bundled-A4NY77AZ.js +94125 -0
- package/dist/main-K4VB62TY.js +65517 -0
- package/dist/main.js +17 -0
- package/dist/reader/visuals.tsx +368 -0
- package/dist/script.d.ts +133 -0
- package/dist/script.js +90 -0
- package/dist/server-R3ERJ4GJ.js +308 -0
- package/dist/src-RDHNYJMO.js +1871 -0
- package/dist/src-XIWV5BGG.js +1126 -0
- package/dist/tack-env.d.ts +137 -0
- package/dist/third-party-licenses.txt +2467 -0
- package/dist/worker-XBNGNPT7.js +24246 -0
- package/package.json +29 -3
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { createRequire as tackCreateRequire } from "node:module"; const require = tackCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
Parser
|
|
4
|
+
} from "./chunk-RZQCGAJF.js";
|
|
5
|
+
import {
|
|
6
|
+
require_picomatch
|
|
7
|
+
} from "./chunk-VV2YFWGB.js";
|
|
8
|
+
import {
|
|
9
|
+
__toESM,
|
|
10
|
+
init_define_TACK_BUILD_INFO
|
|
11
|
+
} from "./chunk-2RUJGM5D.js";
|
|
12
|
+
|
|
13
|
+
// packages/reader/src/host.ts
|
|
14
|
+
init_define_TACK_BUILD_INFO();
|
|
15
|
+
import { spawn as spawnChild } from "node:child_process";
|
|
16
|
+
import { createRequire } from "node:module";
|
|
17
|
+
import { dirname } from "node:path";
|
|
18
|
+
import { Readable } from "node:stream";
|
|
19
|
+
var import_picomatch = __toESM(require_picomatch(), 1);
|
|
20
|
+
var require2 = createRequire(import.meta.url);
|
|
21
|
+
var rspack = () => (
|
|
22
|
+
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- `require` is untyped; the import type names the module it loads.
|
|
23
|
+
require2("@rspack/core").experiments
|
|
24
|
+
);
|
|
25
|
+
var esbuild = () => require2("esbuild");
|
|
26
|
+
var empty = () => new ReadableStream({
|
|
27
|
+
start: (controller) => controller.close()
|
|
28
|
+
});
|
|
29
|
+
var spawnProcess = (options) => {
|
|
30
|
+
const [command, ...args] = options.cmd;
|
|
31
|
+
const child = spawnChild(command, args, {
|
|
32
|
+
...options.cwd === void 0 ? {} : { cwd: options.cwd },
|
|
33
|
+
env: options.env ?? process.env,
|
|
34
|
+
stdio: [
|
|
35
|
+
options.stdin ?? "ignore",
|
|
36
|
+
options.stdout ?? "pipe",
|
|
37
|
+
options.stderr ?? "pipe",
|
|
38
|
+
...options.ipc === void 0 ? [] : ["ipc"]
|
|
39
|
+
],
|
|
40
|
+
serialization: "json"
|
|
41
|
+
});
|
|
42
|
+
if (options.ipc !== void 0) child.on("message", options.ipc);
|
|
43
|
+
const web = (stream) => stream === null ? empty() : (
|
|
44
|
+
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Node types web streams from `node:stream/web`, structurally the global ReadableStream.
|
|
45
|
+
Readable.toWeb(stream)
|
|
46
|
+
);
|
|
47
|
+
const exited = new Promise((resolve) => {
|
|
48
|
+
child.once("exit", (code) => resolve(code ?? 128));
|
|
49
|
+
child.once("error", () => resolve(127));
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
stdout: web(child.stdout),
|
|
53
|
+
stderr: web(child.stderr),
|
|
54
|
+
exited,
|
|
55
|
+
kill: (signal) => {
|
|
56
|
+
child.kill(signal);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var readerProcesses = { spawn: spawnProcess };
|
|
61
|
+
var transpile = (source, loader) => rspack().swc.transformSync(source, {
|
|
62
|
+
jsc: {
|
|
63
|
+
parser: loader === "ts" || loader === "tsx" ? { syntax: "typescript", tsx: loader === "tsx" } : { syntax: "ecmascript", jsx: loader === "jsx" },
|
|
64
|
+
target: "es2022",
|
|
65
|
+
transform: { react: { runtime: "automatic" } }
|
|
66
|
+
},
|
|
67
|
+
module: { type: "es6" },
|
|
68
|
+
isModule: true
|
|
69
|
+
}).code;
|
|
70
|
+
var isNode = (value) => typeof value === "object" && value !== null;
|
|
71
|
+
var importNodes = /* @__PURE__ */ new Set([
|
|
72
|
+
"ImportDeclaration",
|
|
73
|
+
"ExportAllDeclaration",
|
|
74
|
+
"ExportNamedDeclaration",
|
|
75
|
+
"ImportExpression"
|
|
76
|
+
]);
|
|
77
|
+
var specifiersIn = (value) => {
|
|
78
|
+
if (Array.isArray(value)) return value.flatMap(specifiersIn);
|
|
79
|
+
if (isNode(value) === false) return [];
|
|
80
|
+
const own = typeof value.type === "string" && importNodes.has(value.type) && isNode(value.source) && value.source.type === "Literal" && typeof value.source.value === "string" ? [value.source.value] : [];
|
|
81
|
+
return [...own, ...Object.values(value).flatMap(specifiersIn)];
|
|
82
|
+
};
|
|
83
|
+
var scanImports = (source, loader) => specifiersIn(
|
|
84
|
+
Parser.parse(transpile(source, loader), { ecmaVersion: "latest", sourceType: "module" })
|
|
85
|
+
);
|
|
86
|
+
var resolver;
|
|
87
|
+
var resolveModule = async (specifier, fromFile) => {
|
|
88
|
+
resolver ??= new (rspack()).resolver.ResolverFactory({
|
|
89
|
+
conditionNames: ["browser", "import", "module", "default"],
|
|
90
|
+
mainFields: ["browser", "module", "main"],
|
|
91
|
+
extensions: [".tsx", ".ts", ".jsx", ".js", ".mjs", ".json"]
|
|
92
|
+
});
|
|
93
|
+
const result = await resolver.async(dirname(fromFile), specifier);
|
|
94
|
+
if (typeof result.path !== "string")
|
|
95
|
+
throw new Error(result.error ?? `Cannot resolve ${specifier}.`);
|
|
96
|
+
return result.path;
|
|
97
|
+
};
|
|
98
|
+
var isBuildFailure = (error) => error instanceof Error && "errors" in error && Array.isArray(error.errors);
|
|
99
|
+
var compiledModule = /\.(?:[cm]?[jt]sx?|json|css)$/;
|
|
100
|
+
var assetsAsFiles = {
|
|
101
|
+
name: "tack-reader-assets",
|
|
102
|
+
setup: (build) => {
|
|
103
|
+
build.onLoad(
|
|
104
|
+
{ filter: /.*/ },
|
|
105
|
+
(args) => compiledModule.test(args.path) === true ? void 0 : { contents: "", loader: "empty" }
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var checkBrowserBuild = async (entry, external) => {
|
|
110
|
+
try {
|
|
111
|
+
await esbuild().build({
|
|
112
|
+
entryPoints: [entry],
|
|
113
|
+
bundle: true,
|
|
114
|
+
platform: "browser",
|
|
115
|
+
format: "esm",
|
|
116
|
+
external: [...external],
|
|
117
|
+
jsx: "automatic",
|
|
118
|
+
// Nothing is written; an output directory only lets stylesheets and assets join the bundle.
|
|
119
|
+
absWorkingDir: dirname(entry),
|
|
120
|
+
outdir: dirname(entry),
|
|
121
|
+
write: false,
|
|
122
|
+
logLevel: "silent",
|
|
123
|
+
plugins: [assetsAsFiles]
|
|
124
|
+
});
|
|
125
|
+
return { success: true, messages: [] };
|
|
126
|
+
} catch (error) {
|
|
127
|
+
if (isBuildFailure(error) === false) throw error;
|
|
128
|
+
return {
|
|
129
|
+
success: false,
|
|
130
|
+
messages: error.errors.map(
|
|
131
|
+
(message) => message.location === null ? message.text : `${message.location.file}:${message.location.line}: ${message.text}`
|
|
132
|
+
)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var globMatcher = (pattern) => (0, import_picomatch.default)(pattern, { dot: true });
|
|
137
|
+
|
|
138
|
+
// packages/reader/src/reader-files.ts
|
|
139
|
+
init_define_TACK_BUILD_INFO();
|
|
140
|
+
import { fileURLToPath } from "node:url";
|
|
141
|
+
var base = () => true ? new URL("./reader/", import.meta.url) : import.meta.resolve("@tackup/reader");
|
|
142
|
+
var readerFile = (name) => fileURLToPath(new URL(name, base()));
|
|
143
|
+
var readerEntry = (stem) => {
|
|
144
|
+
if (true)
|
|
145
|
+
return fileURLToPath(import.meta.resolve(`${"@tackup/docs"}/${stem}`));
|
|
146
|
+
return readerFile(
|
|
147
|
+
`${stem}${typeof __TACK_READER_ENTRY_EXTENSION__ === "string" ? __TACK_READER_ENTRY_EXTENSION__ : ".ts"}`
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
readerProcesses,
|
|
153
|
+
transpile,
|
|
154
|
+
scanImports,
|
|
155
|
+
resolveModule,
|
|
156
|
+
checkBrowserBuild,
|
|
157
|
+
globMatcher,
|
|
158
|
+
readerFile,
|
|
159
|
+
readerEntry
|
|
160
|
+
};
|
|
161
|
+
/* v8 ignore start -- @preserve */
|
|
162
|
+
/* v8 ignore stop -- @preserve */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire as tackCreateRequire } from "node:module"; const require = tackCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
Schema_exports
|
|
4
|
+
} from "./chunk-I25CGFRW.js";
|
|
5
|
+
import {
|
|
6
|
+
init_define_TACK_BUILD_INFO
|
|
7
|
+
} from "./chunk-2RUJGM5D.js";
|
|
8
|
+
|
|
9
|
+
// packages/reader/src/corpus-errors.ts
|
|
10
|
+
init_define_TACK_BUILD_INFO();
|
|
11
|
+
var ReaderSearchError = class extends Schema_exports.TaggedError()(
|
|
12
|
+
"ReaderSearchError",
|
|
13
|
+
{
|
|
14
|
+
kind: Schema_exports.Literals(["configuration", "read"]),
|
|
15
|
+
message: Schema_exports.String
|
|
16
|
+
}
|
|
17
|
+
) {
|
|
18
|
+
};
|
|
19
|
+
var FigureCheckError = class extends Schema_exports.TaggedError()("FigureCheckError", {
|
|
20
|
+
kind: Schema_exports.Literals(["path", "read"]),
|
|
21
|
+
message: Schema_exports.String
|
|
22
|
+
}) {
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
ReaderSearchError,
|
|
27
|
+
FigureCheckError
|
|
28
|
+
};
|