@r_masseater/msch 0.120.0 → 0.120.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/addon-tasks.mjs +11 -14
- package/dist/addon-tasks.mjs.map +1 -1
- package/dist/cli.mjs +39 -20
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +5 -0
- package/dist/config.mjs +4 -3
- package/dist/config.mjs.map +1 -1
- package/dist/{published-izw3wLkK.mjs → published-u44g9ha6.mjs} +2 -2
- package/dist/{published-izw3wLkK.mjs.map → published-u44g9ha6.mjs.map} +1 -1
- package/dist/{repository-text-cJOgGgCp.mjs → repository-text-BMqkLDDC.mjs} +16 -3
- package/dist/repository-text-BMqkLDDC.mjs.map +1 -0
- package/dist/{workspace-projects-C4I3zOvh.mjs → workspace-projects-wllEd2HL.mjs} +13 -6
- package/dist/workspace-projects-wllEd2HL.mjs.map +1 -0
- package/dist/workspace-settings.mjs +2 -2
- package/package.json +7 -7
- package/dist/repository-text-cJOgGgCp.mjs.map +0 -1
- package/dist/workspace-projects-C4I3zOvh.mjs.map +0 -1
package/dist/addon-tasks.mjs
CHANGED
|
@@ -3,26 +3,15 @@ import { t as LOCKED } from "./locked-inputs-DMSoGCa-.mjs";
|
|
|
3
3
|
import { Effect } from "effect";
|
|
4
4
|
// src/app/addon-tasks.ts
|
|
5
5
|
const NATIVE_OUTPUT = "native/*.node";
|
|
6
|
+
const RELEASE_OUTPUT = "native/release/*.node";
|
|
6
7
|
const MANIFEST = "package.json";
|
|
7
8
|
const ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];
|
|
8
9
|
const cargoTestCommand = (crate, release) => {
|
|
9
10
|
if (release) return `cargo test -p ${crate}-core --release --locked`;
|
|
10
11
|
return `cargo test -p ${crate}-core --locked`;
|
|
11
12
|
};
|
|
12
|
-
const cargoCheckCommand = (crate) => {
|
|
13
|
-
const crates = `-p ${crate}-core -p ${crate}-node`;
|
|
14
|
-
return `cargo fmt ${crates} --check && cargo clippy ${crates} --all-targets --locked -- -D warnings`;
|
|
15
|
-
};
|
|
16
13
|
/** @internal */
|
|
17
14
|
const addonTasksOf = ({ crate, inputs, release = false, command, untrackedEnv = [] }) => ({
|
|
18
|
-
cargo: {
|
|
19
|
-
command: cargoCheckCommand(crate),
|
|
20
|
-
cache: {
|
|
21
|
-
input: [...inputs],
|
|
22
|
-
output: [],
|
|
23
|
-
untrackedEnv: [...untrackedEnv]
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
15
|
"cargo-test": {
|
|
27
16
|
command: cargoTestCommand(crate, release),
|
|
28
17
|
cache: {
|
|
@@ -32,16 +21,24 @@ const addonTasksOf = ({ crate, inputs, release = false, command, untrackedEnv =
|
|
|
32
21
|
}
|
|
33
22
|
},
|
|
34
23
|
native: {
|
|
35
|
-
command
|
|
24
|
+
command: `${command} --profile dev`,
|
|
36
25
|
cache: {
|
|
37
26
|
input: [...inputs, MANIFEST],
|
|
38
27
|
output: [NATIVE_OUTPUT],
|
|
39
28
|
untrackedEnv: [...untrackedEnv]
|
|
40
29
|
}
|
|
41
30
|
},
|
|
31
|
+
"native:release": {
|
|
32
|
+
command: `${command} --profile release`,
|
|
33
|
+
cache: {
|
|
34
|
+
input: [...inputs, MANIFEST],
|
|
35
|
+
output: [RELEASE_OUTPUT],
|
|
36
|
+
untrackedEnv: [...untrackedEnv]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
42
39
|
build: {
|
|
43
40
|
command: "vp pack",
|
|
44
|
-
dependsOn: [
|
|
41
|
+
dependsOn: [{
|
|
45
42
|
task: "build",
|
|
46
43
|
from: "dependencies"
|
|
47
44
|
}],
|
package/dist/addon-tasks.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addon-tasks.mjs","names":[],"sources":["../src/app/addon-tasks.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { DERIVATION_READS, cargoInputs } from \"#/features/derive-cargo-inputs/index.ts\";\nimport type { CargoInput } from \"#/features/derive-cargo-inputs/index.ts\";\nimport { LOCKED } from \"#/shared/lib/locked-inputs.ts\";\n\nexport type AddonTasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface AddonTaskOptions {\n readonly directory: string;\n readonly crate: string;\n readonly release?: boolean;\n readonly command: string;\n readonly untrackedEnv?: readonly string[];\n}\n\n/** @internal */\nexport interface AddonTaskSource extends Omit<AddonTaskOptions, \"directory\"> {\n readonly inputs: readonly CargoInput[];\n}\n\nconst NATIVE_OUTPUT = \"native/*.node\";\nconst MANIFEST = \"package.json\";\nconst ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];\n\nconst cargoTestCommand = (crate: string, release: boolean): string => {\n if (release) {\n return `cargo test -p ${crate}-core --release --locked`;\n }\n return `cargo test -p ${crate}-core --locked`;\n};\n\
|
|
1
|
+
{"version":3,"file":"addon-tasks.mjs","names":[],"sources":["../src/app/addon-tasks.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { DERIVATION_READS, cargoInputs } from \"#/features/derive-cargo-inputs/index.ts\";\nimport type { CargoInput } from \"#/features/derive-cargo-inputs/index.ts\";\nimport { LOCKED } from \"#/shared/lib/locked-inputs.ts\";\n\nexport type AddonTasks = NonNullable<NonNullable<UserConfig[\"run\"]>[\"tasks\"]>;\n\nexport interface AddonTaskOptions {\n readonly directory: string;\n readonly crate: string;\n readonly release?: boolean;\n readonly command: string;\n readonly untrackedEnv?: readonly string[];\n}\n\n/** @internal */\nexport interface AddonTaskSource extends Omit<AddonTaskOptions, \"directory\"> {\n readonly inputs: readonly CargoInput[];\n}\n\nconst NATIVE_OUTPUT = \"native/*.node\";\nconst RELEASE_OUTPUT = \"native/release/*.node\";\nconst MANIFEST = \"package.json\";\nconst ADDON_LOCKED = [...LOCKED.input, ...DERIVATION_READS];\n\nconst cargoTestCommand = (crate: string, release: boolean): string => {\n if (release) {\n return `cargo test -p ${crate}-core --release --locked`;\n }\n return `cargo test -p ${crate}-core --locked`;\n};\n\n/** @internal */\nexport const addonTasksOf = ({\n crate,\n inputs,\n release = false,\n command,\n untrackedEnv = [],\n}: AddonTaskSource): AddonTasks => ({\n \"cargo-test\": {\n command: cargoTestCommand(crate, release),\n cache: { input: [...inputs], output: [], untrackedEnv: [...untrackedEnv] },\n },\n native: {\n command: `${command} --profile dev`,\n cache: {\n input: [...inputs, MANIFEST],\n output: [NATIVE_OUTPUT],\n untrackedEnv: [...untrackedEnv],\n },\n },\n \"native:release\": {\n command: `${command} --profile release`,\n cache: {\n input: [...inputs, MANIFEST],\n output: [RELEASE_OUTPUT],\n untrackedEnv: [...untrackedEnv],\n },\n },\n build: {\n command: \"vp pack\",\n dependsOn: [{ task: \"build\", from: \"dependencies\" }],\n cache: { input: [...ADDON_LOCKED] },\n },\n});\n\nexport const ADDON_TEST = {\n command: \"vp test run\",\n dependsOn: [\"native\", \"cargo-test\"],\n cache: { input: [...ADDON_LOCKED] },\n} as const satisfies AddonTasks[string];\n\nexport const addonTasks = ({ directory, ...source }: AddonTaskOptions): Promise<AddonTasks> =>\n Effect.runPromise(\n Effect.promise(() => cargoInputs({ directory })).pipe(\n Effect.map((inputs) => addonTasksOf({ ...source, inputs })),\n ),\n );\n"],"mappings":";;;;AAsBA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,WAAW;AACjB,MAAM,eAAe,CAAC,GAAG,OAAO,OAAO,GAAG,gBAAgB;AAE1D,MAAM,oBAAoB,OAAe,YAA6B;CACpE,IAAI,SACF,OAAO,iBAAiB,MAAM;CAEhC,OAAO,iBAAiB,MAAM;AAChC;;AAGA,MAAa,gBAAgB,EAC3B,OACA,QACA,UAAU,OACV,SACA,eAAe,CAAC,SACkB;CAClC,cAAc;EACZ,SAAS,iBAAiB,OAAO,OAAO;EACxC,OAAO;GAAE,OAAO,CAAC,GAAG,MAAM;GAAG,QAAQ,CAAC;GAAG,cAAc,CAAC,GAAG,YAAY;EAAE;CAC3E;CACA,QAAQ;EACN,SAAS,GAAG,QAAQ;EACpB,OAAO;GACL,OAAO,CAAC,GAAG,QAAQ,QAAQ;GAC3B,QAAQ,CAAC,aAAa;GACtB,cAAc,CAAC,GAAG,YAAY;EAChC;CACF;CACA,kBAAkB;EAChB,SAAS,GAAG,QAAQ;EACpB,OAAO;GACL,OAAO,CAAC,GAAG,QAAQ,QAAQ;GAC3B,QAAQ,CAAC,cAAc;GACvB,cAAc,CAAC,GAAG,YAAY;EAChC;CACF;CACA,OAAO;EACL,SAAS;EACT,WAAW,CAAC;GAAE,MAAM;GAAS,MAAM;EAAe,CAAC;EACnD,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;CACpC;AACF;AAEA,MAAa,aAAa;CACxB,SAAS;CACT,WAAW,CAAC,UAAU,YAAY;CAClC,OAAO,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE;AACpC;AAEA,MAAa,cAAc,EAAE,WAAW,GAAG,aACzC,OAAO,WACL,OAAO,cAAc,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAC/C,OAAO,KAAK,WAAW,aAAa;CAAE,GAAG;CAAQ;AAAO,CAAC,CAAC,CAC5D,CACF"}
|
package/dist/cli.mjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { i as nodeRepositoryFiles, n as NODE_MODULES$2, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-C8B7lrka.mjs";
|
|
3
3
|
import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-D0e14vkQ.mjs";
|
|
4
4
|
import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-OrBsaeID.mjs";
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as childrenOf$4, D as propertyValue, E as nestedValues, O as stringsIn, S as KeySchema, T as literalOf, a as workspaceManifest, c as TASK_NAMES, d as definesTask, f as hasCargoTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, p as hasVerifyTask, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as keyName, x as workspaceConfigOf } from "./workspace-projects-wllEd2HL.mjs";
|
|
6
6
|
import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
|
|
7
|
-
import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as isIndexSkill, v as shadcnUiOf } from "./published-
|
|
7
|
+
import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as isIndexSkill, v as shadcnUiOf } from "./published-u44g9ha6.mjs";
|
|
8
8
|
import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-W6Uy7bV8.mjs";
|
|
9
|
-
import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-
|
|
9
|
+
import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-BMqkLDDC.mjs";
|
|
10
10
|
import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
|
|
11
11
|
import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-CYgaGe8E.mjs";
|
|
12
12
|
import { builtinModules, isBuiltin } from "node:module";
|
|
13
|
-
import { Array as Array$1, Boolean as Boolean$1, Clock, Config, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Stdio, Stream, String as String$1, pipe } from "effect";
|
|
13
|
+
import { Array as Array$1, Boolean as Boolean$1, Clock, Config, Console, Context, Effect, Equal, FileSystem, Function, HashMap, HashSet, Match, Metric, Number as Number$1, Option, Order, Path, Predicate, Record, Redacted, Result, Runtime, Schedule, Schema, SchemaTransformation, Semaphore, Stdio, Stream, String as String$1, pipe } from "effect";
|
|
14
14
|
import { Argument, Command, Flag } from "effect/cli";
|
|
15
15
|
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
16
16
|
import { hookFlags } from "@r_masseater/masseater-utils/hook-flags";
|
|
@@ -47,7 +47,7 @@ import { Buffer } from "node:buffer";
|
|
|
47
47
|
import { createZstdDecompress } from "node:zlib";
|
|
48
48
|
// package.json
|
|
49
49
|
var name = "@r_masseater/msch";
|
|
50
|
-
var version = "0.120.
|
|
50
|
+
var version = "0.120.2";
|
|
51
51
|
var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
|
|
52
52
|
var repository = {
|
|
53
53
|
"type": "git",
|
|
@@ -13236,13 +13236,16 @@ const versionProblemIn = Effect.fn("versionProblemIn")(function* versionProblemI
|
|
|
13236
13236
|
message: `crate ${crate.name} is version ${crate.version} but ${workspace.value}/${PACKAGE_JSON_FILE} is ${version.value}. msch publish releases the version in package.json, so bump both in the same PR.`
|
|
13237
13237
|
});
|
|
13238
13238
|
});
|
|
13239
|
+
const lintedPerWorkspace = (config) => Effect.map(hasCargoTask(config), (atRoot) => !atRoot);
|
|
13239
13240
|
/** @internal */
|
|
13240
13241
|
const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
|
|
13241
13242
|
const files = yield* RepositoryFiles;
|
|
13242
13243
|
if (!(yield* files.exists(files.join(root, CARGO_FILE$1)))) return [];
|
|
13243
13244
|
const directories = yield* workspaceDirectories(root);
|
|
13244
13245
|
const crates = yield* cratesIn(root);
|
|
13245
|
-
const
|
|
13246
|
+
const notAtRoot = yield* Effect.cached(lintedPerWorkspace(files.join(root, CONFIG_FILE$8)));
|
|
13247
|
+
const unverified = (crate) => problemIn$3(root, directories, crate).pipe(Effect.when(notAtRoot), Effect.map(Option.flatten));
|
|
13248
|
+
const found = yield* Effect.forEach(crates, (crate) => Effect.all([unverified(crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$28 });
|
|
13246
13249
|
return Array$1.getSomes(Array$1.flatten(found));
|
|
13247
13250
|
});
|
|
13248
13251
|
// src/features/check-repository-layout/model/deploy-entry-patterns.ts
|
|
@@ -14364,7 +14367,7 @@ const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(dev
|
|
|
14364
14367
|
const RULE$50 = "optional-peer";
|
|
14365
14368
|
const REQUIRED_RULE = "required-peer";
|
|
14366
14369
|
const START$28 = 0;
|
|
14367
|
-
const SINGLE$
|
|
14370
|
+
const SINGLE$3 = 1;
|
|
14368
14371
|
const DEPENDENCIES_KEY = "\"dependencies\"";
|
|
14369
14372
|
const PEER_META_KEY = "\"peerDependenciesMeta\"";
|
|
14370
14373
|
const importsPackage = (name) => ({ packages }) => Array$1.contains(packages, name);
|
|
@@ -14389,7 +14392,7 @@ const librariesIn = (used) => pipe(used, Array$1.filter(({ entry }) => !isBinEnt
|
|
|
14389
14392
|
const optionalPeerProblems = ({ located, manifest, used }) => {
|
|
14390
14393
|
const libraries = librariesIn(used);
|
|
14391
14394
|
const bins = pipe(used, Array$1.filter(({ entry }) => isBinEntry(entry)));
|
|
14392
|
-
if (libraries.length <= SINGLE$
|
|
14395
|
+
if (libraries.length <= SINGLE$3) return [];
|
|
14393
14396
|
return pipe(Record.keys(manifest.dependencies ?? {}), Array$1.flatMap((name) => {
|
|
14394
14397
|
const importers = pipe(libraries, Array$1.filter(importsPackage(name)));
|
|
14395
14398
|
const neededByBin = pipe(bins, Array$1.some(importsPackage(name)));
|
|
@@ -18667,7 +18670,7 @@ const PLUGIN_NAME = /^[\p{Ll}\p{Nd}-]{1,64}$/u;
|
|
|
18667
18670
|
const ALLOWED_PATH = /^[A-Za-z0-9 _.\-/(),]+$/u;
|
|
18668
18671
|
const XML_TAG = /<[A-Za-z][^>]*>/u;
|
|
18669
18672
|
const ARCHIVE = ".zip";
|
|
18670
|
-
const SINGLE = 1;
|
|
18673
|
+
const SINGLE$2 = 1;
|
|
18671
18674
|
const SkillFields$1 = Schema.Struct({
|
|
18672
18675
|
name: Schema.optionalKey(Schema.String),
|
|
18673
18676
|
description: Schema.optionalKey(Schema.String)
|
|
@@ -18731,7 +18734,7 @@ const skillViolations = (skills) => {
|
|
|
18731
18734
|
Option.liftPredicate("has no name.", () => String$1.isEmpty(name)),
|
|
18732
18735
|
Option.liftPredicate("has no description.", () => String$1.isEmpty(description)),
|
|
18733
18736
|
Option.liftPredicate("has an XML tag in its name or description.", () => XML_TAG.test(`${name}\n${description}`)),
|
|
18734
|
-
Option.liftPredicate(`shares the name ${name} with another SKILL.md of the plugin.`, () => pipe(Record.get(counts, name), Option.exists((group) => group.length > SINGLE)))
|
|
18737
|
+
Option.liftPredicate(`shares the name ${name} with another SKILL.md of the plugin.`, () => pipe(Record.get(counts, name), Option.exists((group) => group.length > SINGLE$2)))
|
|
18735
18738
|
], Array$1.getSomes, Array$1.map((message) => violation(file, message)))));
|
|
18736
18739
|
};
|
|
18737
18740
|
const skillFilesOf = (plugin) => pipe(plugin.files, Array$1.filter((file) => file === SKILL_FILE$1 || String$1.endsWith(`${SEPARATOR$6}${SKILL_FILE$1}`)(file)));
|
|
@@ -21529,7 +21532,10 @@ const nativeFields = (native) => {
|
|
|
21529
21532
|
const nativeReadme = ({ name, target }) => `# ${name}-${target}\n\nThe prebuilt ${target} native addon of [${name}](https://www.npmjs.com/package/${name}). Install ${name} instead; npm picks this package for your platform.\n`;
|
|
21530
21533
|
// src/features/publish-workspace/model/native-package.ts
|
|
21531
21534
|
const NPM_DIR = "npm";
|
|
21532
|
-
|
|
21535
|
+
/** @internal */
|
|
21536
|
+
const BUILT_DIR = "native";
|
|
21537
|
+
/** @internal */
|
|
21538
|
+
const RELEASE_DIR = "native/release";
|
|
21533
21539
|
const KEPT_FIELDS = [
|
|
21534
21540
|
"license",
|
|
21535
21541
|
"repository",
|
|
@@ -21542,14 +21548,14 @@ const keptFields = Effect.fn("keptFields")(function* keptFields(directory) {
|
|
|
21542
21548
|
return pipe(fields, Record.filter((_value, key) => Array$1.contains(KEPT_FIELDS, key)));
|
|
21543
21549
|
});
|
|
21544
21550
|
/** @internal */
|
|
21545
|
-
const writeNative = Effect.fn("publish.writeNative")(function* writeNative(directory, native) {
|
|
21551
|
+
const writeNative = Effect.fn("publish.writeNative")(function* writeNative(directory, native, builtIn) {
|
|
21546
21552
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
21547
21553
|
const path = yield* Path.Path;
|
|
21548
21554
|
const kept = yield* keptFields(directory);
|
|
21549
21555
|
const target = path.resolve(directory, NPM_DIR, native.target);
|
|
21550
21556
|
const file = nativeFileOf(native);
|
|
21551
21557
|
yield* fileSystem.makeDirectory(target, { recursive: true });
|
|
21552
|
-
yield* fileSystem.copyFile(path.join(directory,
|
|
21558
|
+
yield* fileSystem.copyFile(path.join(directory, builtIn, file), path.join(target, file));
|
|
21553
21559
|
yield* Effect.all([writePackageJson(target, {
|
|
21554
21560
|
...kept,
|
|
21555
21561
|
...nativeFields(native)
|
|
@@ -21621,12 +21627,17 @@ const builtOf$1 = (directory, manifest) => pipe(Option.fromUndefinedOr(manifest.
|
|
|
21621
21627
|
target
|
|
21622
21628
|
})))));
|
|
21623
21629
|
const packedNative = Effect.fn("compat.packedNative")(function* packedNative({ directory, manifest, binary, target }) {
|
|
21630
|
+
yield* mustSucceed({
|
|
21631
|
+
command: "vp",
|
|
21632
|
+
args: ["run", "native"],
|
|
21633
|
+
cwd: directory
|
|
21634
|
+
});
|
|
21624
21635
|
const written = yield* writeNative(directory, {
|
|
21625
21636
|
name: manifest.name,
|
|
21626
21637
|
version: manifest.version,
|
|
21627
21638
|
binary,
|
|
21628
21639
|
target
|
|
21629
|
-
});
|
|
21640
|
+
}, BUILT_DIR);
|
|
21630
21641
|
const tarball = yield* pack(written);
|
|
21631
21642
|
return [[`${manifest.name}-${target}`, tarball]];
|
|
21632
21643
|
});
|
|
@@ -21695,6 +21706,7 @@ const meetsPeer = (peers) => ({ name, version }) => Option.match(Record.get(peer
|
|
|
21695
21706
|
const tarballsFor = (peers) => (local) => pipe(local, Array$1.filter(meetsPeer(peers)), Array$1.flatMap(({ tarballs }) => Record.toEntries(tarballs)), Record.fromEntries);
|
|
21696
21707
|
// src/features/publish-workspace/model/compat.ts
|
|
21697
21708
|
const INSTALL_FLAGS = ["--no-audit", "--no-fund"];
|
|
21709
|
+
const SINGLE$1 = 1;
|
|
21698
21710
|
const IMPORT_ONLY = "await import(process.argv[1])";
|
|
21699
21711
|
const Versions$1 = Schema.String.pipe(Schema.Array, Schema.fromJsonString);
|
|
21700
21712
|
const installedNode = Effect.fn("compat.node")(function* installedNode(directory, range) {
|
|
@@ -21822,21 +21834,26 @@ const runCase = Effect.fn("compat.case")(function* runCase({ manifest, local, co
|
|
|
21822
21834
|
});
|
|
21823
21835
|
}, Effect.scoped);
|
|
21824
21836
|
/** @internal */
|
|
21825
|
-
const
|
|
21837
|
+
const checkCompatPacking = Effect.fn("publish.compat")(function* checkCompatPacking(directory, packing) {
|
|
21826
21838
|
const manifest = yield* readVersionedPackageJson(directory);
|
|
21827
21839
|
const cases = compatCasesOf(manifest);
|
|
21828
21840
|
if (Array$1.isReadonlyArrayEmpty(cases)) return yield* IncompatiblePackage.make({ message: `${manifest.name} declares no engines.node, so there is no supported Node.js range to check` });
|
|
21829
|
-
const local = yield* workspaceTarballs(directory, manifest);
|
|
21841
|
+
const local = yield* workspaceTarballs(directory, manifest).pipe(Semaphore.withPermits(packing, SINGLE$1));
|
|
21830
21842
|
yield* Effect.forEach(cases, (compat) => runCase({
|
|
21831
21843
|
manifest,
|
|
21832
21844
|
local,
|
|
21833
21845
|
compat
|
|
21834
21846
|
}), {
|
|
21835
|
-
concurrency:
|
|
21847
|
+
concurrency: "unbounded",
|
|
21836
21848
|
discard: true
|
|
21837
21849
|
});
|
|
21838
21850
|
return yield* checkPluginInstall(directory, manifest, tarballsFor({})(local));
|
|
21839
21851
|
}, Effect.scoped);
|
|
21852
|
+
/** @internal */
|
|
21853
|
+
const checkCompat = Effect.fn("publish.compatOne")(function* checkCompat(directory) {
|
|
21854
|
+
const packing = yield* Semaphore.make(SINGLE$1);
|
|
21855
|
+
return yield* checkCompatPacking(directory, packing);
|
|
21856
|
+
});
|
|
21840
21857
|
// src/features/publish-workspace/model/consumer-build.ts
|
|
21841
21858
|
const PNPMFILE = ".pnpmfile.cjs";
|
|
21842
21859
|
const TASK = "msch";
|
|
@@ -22538,6 +22555,7 @@ const writeCompatPlan = Effect.fn("publish.compatPlan")(function* writeCompatPla
|
|
|
22538
22555
|
// src/features/publish-workspace/model/compat-changed.ts
|
|
22539
22556
|
const LOCAL_ONLY = "the compat jobs of the verify workflow run it for every package in CI";
|
|
22540
22557
|
const ARITY = 2;
|
|
22558
|
+
const SINGLE = 1;
|
|
22541
22559
|
const selected = (workspaces, directories) => {
|
|
22542
22560
|
if (Array$1.isReadonlyArrayEmpty(directories)) return workspaces;
|
|
22543
22561
|
return pipe(workspaces, Array$1.filter((workspace) => Array$1.contains(directories, workspace)));
|
|
@@ -22550,8 +22568,9 @@ const checkChangedCompat = Effect.fn("publish.compatChanged")(function* checkCha
|
|
|
22550
22568
|
const graph = yield* graphTasks;
|
|
22551
22569
|
const chosen = selectedWorkspaces(workspacesOf(graph), directories);
|
|
22552
22570
|
const checked = yield* Effect.filter(chosen, isChecked, { concurrency: 1 });
|
|
22553
|
-
yield*
|
|
22554
|
-
|
|
22571
|
+
const packing = yield* Semaphore.make(SINGLE);
|
|
22572
|
+
yield* Effect.forEach(checked, (directory) => checkCompatPacking(directory, packing), {
|
|
22573
|
+
concurrency: "unbounded",
|
|
22555
22574
|
discard: true
|
|
22556
22575
|
});
|
|
22557
22576
|
return yield* checkConsumers(checked);
|
|
@@ -22604,7 +22623,7 @@ const publishNatives = Effect.fn("publish.publishNatives")(function* publishNati
|
|
|
22604
22623
|
version: manifest.version,
|
|
22605
22624
|
binary,
|
|
22606
22625
|
target
|
|
22607
|
-
}), { concurrency: 1 });
|
|
22626
|
+
}, RELEASE_DIR), { concurrency: 1 });
|
|
22608
22627
|
const names = yield* Effect.forEach(written, publishNative, { concurrency: 1 });
|
|
22609
22628
|
yield* addOptionalDependencies(directory, names, manifest.version);
|
|
22610
22629
|
});
|