@prestack/thread 0.0.1 → 0.0.2
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/core/actor.ts +20 -0
- package/dist/core/asking.d.ts +0 -1
- package/dist/core/asking.js +0 -1
- package/dist/core/asking.ts +1342 -0
- package/dist/core/attach.js +2 -2
- package/dist/core/attach.ts +585 -0
- package/dist/core/chain.js +8 -1
- package/dist/core/chain.ts +148 -0
- package/dist/core/cli.js +97 -18
- package/dist/core/cli.ts +2004 -0
- package/dist/core/condition.ts +227 -0
- package/dist/core/descend.d.ts +1 -0
- package/dist/core/descend.js +36 -0
- package/dist/core/descend.ts +1001 -0
- package/dist/core/finding.ts +38 -0
- package/dist/core/generators/meta.js +6 -0
- package/dist/core/generators/meta.ts +1006 -0
- package/dist/core/init.ts +170 -0
- package/dist/core/invoked.ts +47 -0
- package/dist/core/round.ts +57 -0
- package/dist/core/rows.ts +369 -0
- package/dist/core/scope.ts +18 -0
- package/dist/core/thread.ts +29 -0
- package/dist/core/tree.ts +67 -0
- package/dist/core/types.ts +350 -0
- package/dist/derivation/attach.js +1 -1
- package/dist/derivation/attach.ts +68 -0
- package/dist/derivation/generators/build.ts +232 -0
- package/dist/derivation/generators/check.ts +118 -0
- package/dist/derivation/generators/derivation.ts +347 -0
- package/dist/derivation/generators/determinism.ts +145 -0
- package/dist/derivation/generators/release.js +19 -9
- package/dist/derivation/generators/release.ts +213 -0
- package/dist/derivation/makers/release.ts +135 -0
- package/dist/derivation/release.ts +23 -0
- package/dist/integrations/attach.js +2 -2
- package/dist/integrations/attach.ts +207 -0
- package/dist/integrations/generators/read.ts +127 -0
- package/dist/integrations/generators/secret.ts +289 -0
- package/dist/integrations/generators/target.js +16 -6
- package/dist/integrations/generators/target.ts +944 -0
- package/dist/integrations/generators/vault.js +46 -14
- package/dist/integrations/generators/vault.ts +212 -0
- package/dist/integrations/{sdk.js → module.js} +4 -4
- package/dist/integrations/module.ts +189 -0
- package/dist/integrations/secret.ts +50 -0
- package/dist/integrations/target.d.ts +3 -1
- package/dist/integrations/target.js +14 -11
- package/dist/integrations/target.ts +340 -0
- package/dist/integrations/vault.d.ts +2 -0
- package/dist/integrations/vault.js +4 -2
- package/dist/integrations/vault.ts +136 -0
- package/dist/integrity/attach.ts +234 -0
- package/dist/integrity/check-threads.js +2 -26
- package/dist/integrity/check-threads.ts +166 -0
- package/dist/integrity/constraint.ts +1202 -0
- package/dist/integrity/generators/compiler.ts +161 -0
- package/dist/integrity/generators/gate.ts +201 -0
- package/dist/integrity/generators/issues.ts +160 -0
- package/dist/integrity/generators/publish.js +14 -5
- package/dist/integrity/generators/publish.ts +247 -0
- package/dist/integrity/generators/rule.ts +271 -0
- package/dist/integrity/generators/seal.ts +117 -0
- package/dist/integrity/generators/trial.ts +320 -0
- package/dist/integrity/lint.ts +227 -0
- package/dist/integrity/lsp/bin.ts +42 -0
- package/dist/integrity/lsp/diagnostics.ts +92 -0
- package/dist/integrity/lsp/findings.ts +63 -0
- package/dist/integrity/lsp/lint.ts +140 -0
- package/dist/integrity/lsp/protocol.ts +78 -0
- package/dist/integrity/lsp/server.ts +224 -0
- package/dist/integrity/sealed.js +2 -2
- package/dist/integrity/sealed.ts +56 -0
- package/dist/integrity/slopnator.ts +350 -0
- package/dist/integrity/slopnators/sl_broken_lineage.ts +36 -0
- package/dist/integrity/slopnators/sl_declared_elsewhere.ts +39 -0
- package/dist/integrity/slopnators/sl_derived_drift.ts +98 -0
- package/dist/integrity/slopnators/sl_hardcoded_style.ts +55 -0
- package/dist/integrity/slopnators/sl_inert_island.ts +91 -0
- package/dist/integrity/slopnators/sl_inert_slopnator.ts +93 -0
- package/dist/integrity/slopnators/sl_missing_row.ts +182 -0
- package/dist/integrity/slopnators/sl_no_barrel.ts +48 -0
- package/dist/integrity/slopnators/sl_no_child_process.ts +74 -0
- package/dist/integrity/slopnators/sl_no_comment.ts +43 -0
- package/dist/integrity/slopnators/sl_no_dispatch_bypass.ts +328 -0
- package/dist/integrity/slopnators/sl_no_import_cycle.ts +50 -0
- package/dist/integrity/slopnators/sl_no_such_command.ts +64 -0
- package/dist/integrity/slopnators/sl_only_takes_a_literal.ts +63 -0
- package/dist/integrity/slopnators/sl_secret_literal.ts +100 -0
- package/dist/integrity/slopnators/sl_stale_path.ts +94 -0
- package/dist/integrity/slopnators/sl_twice_meant.ts +31 -0
- package/dist/integrity/slopnators/sl_twice_parented.ts +37 -0
- package/dist/integrity/slopnators/sl_undeclared_crossing.ts +87 -0
- package/dist/integrity/slopnators/sl_undeclared_destination.ts +65 -0
- package/dist/integrity/slopnators/sl_undeclared_element.ts +44 -0
- package/dist/integrity/slopnators/sl_undeclared_node.ts +69 -0
- package/dist/integrity/slopnators/sl_undeclared_operation.ts +147 -0
- package/dist/integrity/slopnators/sl_undeclared_variant.ts +148 -0
- package/dist/integrity/slopnators/sl_undescribed.ts +65 -0
- package/dist/integrity/slopnators/sl_ungoverned_island.ts +61 -0
- package/dist/integrity/slopnators/sl_unkept_rows.ts +111 -0
- package/dist/integrity/slopnators/sl_unnamed_island.ts +41 -0
- package/dist/integrity/slopnators/sl_unpaired_member.ts +131 -0
- package/dist/integrity/slopnators/sl_unpaired_slopnator.ts +58 -0
- package/dist/integrity/slopnators/sl_unprefixed_member.ts +136 -0
- package/dist/integrity/slopnators/sl_unseamed_reach.ts +79 -0
- package/dist/integrity/slopnators/sl_unthreaded.ts +419 -0
- package/dist/integrity/slopnators/sl_untranslated_key.ts +164 -0
- package/dist/integrity/slopnators/sl_unversioned.ts +36 -0
- package/dist/integrity/sweep.ts +307 -0
- package/dist/knowledge/attach.ts +350 -0
- package/dist/knowledge/generators/docsgen.ts +174 -0
- package/dist/knowledge/generators/glossary.ts +73 -0
- package/dist/knowledge/generators/skills.ts +263 -0
- package/dist/knowledge/glossary.ts +6 -0
- package/dist/operations/access.ts +88 -0
- package/dist/operations/attach.ts +475 -0
- package/dist/operations/capabilities.ts +65 -0
- package/dist/operations/cost.ts +58 -0
- package/dist/operations/dispatch.ts +348 -0
- package/dist/operations/error-results.ts +31 -0
- package/dist/operations/errors/catalog.ts +168 -0
- package/dist/operations/errors/classes.ts +51 -0
- package/dist/operations/errors/errors.ts +314 -0
- package/dist/operations/generators/capability.js +29 -19
- package/dist/operations/generators/capability.ts +704 -0
- package/dist/operations/generators/compile.js +20 -1
- package/dist/operations/generators/compile.ts +643 -0
- package/dist/operations/generators/grant.ts +336 -0
- package/dist/operations/generators/operation.ts +972 -0
- package/dist/operations/generators/permits.ts +223 -0
- package/dist/operations/generators/seed.ts +347 -0
- package/dist/operations/generators/trial.js +4 -1
- package/dist/operations/generators/trial.ts +529 -0
- package/dist/operations/http.ts +164 -0
- package/dist/operations/makers/capability.ts +166 -0
- package/dist/operations/makers/trial.ts +520 -0
- package/dist/operations/memory.ts +470 -0
- package/dist/operations/metering.ts +328 -0
- package/dist/operations/nodes.ts +54 -0
- package/dist/operations/operations.ts +32 -0
- package/dist/operations/queue-policy.ts +10 -0
- package/dist/operations/result.ts +28 -0
- package/dist/operations/seams.d.ts +4 -4
- package/dist/operations/seams.ts +364 -0
- package/dist/operations/store.ts +29 -0
- package/package.json +8 -1
- package/dist/integrations/generators/sdk.d.ts +0 -1
- package/dist/integrations/generators/sdk.js +0 -148
- /package/dist/integrations/{sdk.d.ts → module.d.ts} +0 -0
|
@@ -42,7 +42,7 @@ const ASKS = [
|
|
|
42
42
|
key: 'uses',
|
|
43
43
|
edits: true,
|
|
44
44
|
says: [
|
|
45
|
-
'ONLY for
|
|
45
|
+
'ONLY for module and cli — the npm package to install, or the',
|
|
46
46
|
'program to run. Not asked for the other four, and refused on them',
|
|
47
47
|
],
|
|
48
48
|
},
|
|
@@ -57,7 +57,7 @@ const ASKS = [
|
|
|
57
57
|
edits: true,
|
|
58
58
|
says: [
|
|
59
59
|
'comma-separated — entity ids for a place that keeps things, call',
|
|
60
|
-
'ids for one that is called. For
|
|
60
|
+
'ids for one that is called. For module and cli it is what the thing',
|
|
61
61
|
'can do, read off its published types and offered to you. Usually',
|
|
62
62
|
'left blank here and filled by `call`, by `thread entity`, or by `edit`',
|
|
63
63
|
],
|
|
@@ -278,12 +278,12 @@ const method = (nonce) => [
|
|
|
278
278
|
'`new` asks, in this order:',
|
|
279
279
|
'',
|
|
280
280
|
...ASKED,
|
|
281
|
-
' and then, at a terminal only, for
|
|
281
|
+
' and then, at a terminal only, for a module whose package holds resources: naming one above asks',
|
|
282
282
|
' which of its methods you want, and what is written is the whole path — `customers.create`.',
|
|
283
283
|
' Blank there takes every method it just listed. There is no key for it, because a piped answer',
|
|
284
284
|
' names whole paths in `accepts` and never needs asking twice.',
|
|
285
285
|
'',
|
|
286
|
-
`\`edit\` takes: ${EDITS.join(', ')} — and for
|
|
286
|
+
`\`edit\` takes: ${EDITS.join(', ')} — and for a module it reads the package again, so a version`,
|
|
287
287
|
'that gained methods offers them without the row being retyped.',
|
|
288
288
|
'',
|
|
289
289
|
'`call` asks, in this order:',
|
|
@@ -423,7 +423,7 @@ if (arrives !== null) {
|
|
|
423
423
|
if (uses === '') {
|
|
424
424
|
shut();
|
|
425
425
|
refuse(arrives === 'npm'
|
|
426
|
-
? '
|
|
426
|
+
? 'a module installs something — the npm package is what `npm install` is given'
|
|
427
427
|
: 'a command runs something — the program is what you would type at a shell');
|
|
428
428
|
}
|
|
429
429
|
if (!(arrives === 'npm' ? PACKAGE : PROGRAM).test(uses)) {
|
|
@@ -448,6 +448,16 @@ else if (arrives === 'machine') {
|
|
|
448
448
|
'— install it the way this machine installs programs and run this again. Nothing was written.');
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
+
const driver = HOLDS[word].driver;
|
|
452
|
+
if (driver !== null) {
|
|
453
|
+
stdout.write(`target: installing ${driver} …\n`);
|
|
454
|
+
const opened = spawnSync('npm', ['install', driver], { cwd: TREE.at, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
455
|
+
if (opened.status !== 0) {
|
|
456
|
+
shut();
|
|
457
|
+
refuse(`npm install ${driver} failed, so nothing was declared. A ${word} target is opened with ${driver}, and the store written for it imports that package:\n${`${opened.stdout ?? ''}${opened.stderr ?? ''}`.trim()}`);
|
|
458
|
+
}
|
|
459
|
+
stdout.write(`target: installed ${driver} — what a ${word} target is opened with.\n`);
|
|
460
|
+
}
|
|
451
461
|
let offered = [];
|
|
452
462
|
let deeper = new Map();
|
|
453
463
|
if (HOLDS[word].takes === 'names' && arrives === 'npm') {
|
|
@@ -715,7 +725,7 @@ function grows(id, name, uses, held) {
|
|
|
715
725
|
`The row states \`_threads/run_${name}.ts\`, one line naming this integration so the shared runner knows ` +
|
|
716
726
|
'which it is — there is nothing in that file to change that declaring this again would not write the same ' +
|
|
717
727
|
'way. This verb exists only because the integration is declared: take the target away and it goes.';
|
|
718
|
-
writeFileSync(inTree(TREE, `run_${name}.ts`), `import { ran } from '../
|
|
728
|
+
writeFileSync(inTree(TREE, `run_${name}.ts`), `import { ran } from '../module.ts'\n\nawait ran(${quoted(name)})\n`, 'utf8');
|
|
719
729
|
const owner = inTree(TREE, 'integrations.ts');
|
|
720
730
|
try {
|
|
721
731
|
const owned = readFileSync(owner, 'utf8');
|