@r_masseater/msch 0.102.0 → 0.104.0
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/cli.mjs +5 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +3 -2
- package/dist/config.mjs.map +1 -1
- package/dist/{index-uu_6hUYh.d.mts → index-BjHoDbVQ.d.mts} +2 -1
- package/dist/lint-rules.mjs +3 -3
- package/dist/lint-rules.mjs.map +1 -1
- package/dist/{published-DDN36qgu.mjs → published-DUBTOequ.mjs} +12 -10
- package/dist/{published-DDN36qgu.mjs.map → published-DUBTOequ.mjs.map} +1 -1
- package/dist/{repository-text-B1wK0ETA.mjs → repository-text-CpxPEeM-.mjs} +19 -10
- package/dist/repository-text-CpxPEeM-.mjs.map +1 -0
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +3 -2
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/repository-text-B1wK0ETA.mjs.map +0 -1
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkspaceSettings } from "./index-
|
|
1
|
+
import { a as WorkspaceSettings } from "./index-BjHoDbVQ.mjs";
|
|
2
2
|
import { r as MarkdownOptions } from "./index-Cg3RkK6V.mjs";
|
|
3
3
|
import { ToolSections } from "@r_masseater/vite-plus-adopt";
|
|
4
4
|
import { Schema } from "effect";
|
package/dist/config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as requiredStack, g as decisionTestRules, i as markdownOf, p as lint, s as structureOf, x as exempt } from "./define-lint-preset-Jiu7pMHB.mjs";
|
|
2
|
-
import { i as textlintOf, n as secretsOf, o as tasksOf } from "./repository-text-
|
|
2
|
+
import { i as textlintOf, n as secretsOf, o as tasksOf } from "./repository-text-CpxPEeM-.mjs";
|
|
3
3
|
import { Array, Option, Record, pipe } from "effect";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { recommended } from "@r_masseater/fu4/presets";
|
|
@@ -73,7 +73,8 @@ const repositoryConfig = (options) => {
|
|
|
73
73
|
}),
|
|
74
74
|
textlint: textlintOf({
|
|
75
75
|
...textlint,
|
|
76
|
-
published: workspace.publishedArticles
|
|
76
|
+
published: workspace.publishedArticles,
|
|
77
|
+
drafts: workspace.draftArticles
|
|
77
78
|
}),
|
|
78
79
|
y8: markdownOf({
|
|
79
80
|
...markdown,
|
package/dist/config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":["Rec","preset","Arr"],"sources":["../src/app/repository-config.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n exempt,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\nimport type { AddedRulesValue } from \"#/shared/lib/added-rules.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface AddedOverride {\n readonly files: readonly string[];\n readonly excludeFiles?: readonly string[];\n readonly rules: AddedRulesValue;\n}\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly AddedOverride[];\n readonly textlint?: TextOptions;\n readonly markdown?: Omit<MarkdownOptions, \"indexSkill\">;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst added = ({ files, excludeFiles, rules }: AddedOverride): OxlintOverride =>\n pipe(\n Option.fromUndefinedOr(excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files: [...files], rules: { ...rules } }),\n onSome: (excluded): OxlintOverride => ({\n files: [...files],\n excludeFiles: [...excluded],\n rules: { ...rules },\n }),\n }),\n );\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: exempt,\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...pipe(overrides, Arr.map(added)),\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: exempt,\n }),\n textlint: textlintOf({
|
|
1
|
+
{"version":3,"file":"config.mjs","names":["Rec","preset","Arr"],"sources":["../src/app/repository-config.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\n\nimport { recommended } from \"@r_masseater/fu4/presets\";\nimport { Array as Arr, Option, Record as Rec, pipe } from \"effect\";\nimport type { UserConfig } from \"vite-plus\";\nimport type { OxlintOverride } from \"vite-plus/lint\";\n\nimport type { WorkspaceSettings } from \"#/features/build-workspace-settings/index.ts\";\nimport type { MarkdownOptions } from \"#/features/define-lint-preset/index.ts\";\nimport {\n decisionTestRules,\n exempt,\n lint as preset,\n markdownOf,\n requiredStack,\n structureOf,\n} from \"#/features/define-lint-preset/index.ts\";\nimport type { AddedRulesValue } from \"#/shared/lib/added-rules.ts\";\n\nimport { tasksOf } from \"./repository-tasks.ts\";\nimport { secretsOf, textlintOf } from \"./repository-text.ts\";\nimport type { TextOptions } from \"./repository-text.ts\";\n\nexport { secretsOf } from \"./repository-text.ts\";\n\nexport interface AddedOverride {\n readonly files: readonly string[];\n readonly excludeFiles?: readonly string[];\n readonly rules: AddedRulesValue;\n}\n\nexport interface RepositoryOptions {\n readonly workspace: WorkspaceSettings;\n readonly overrides?: readonly AddedOverride[];\n readonly textlint?: TextOptions;\n readonly markdown?: Omit<MarkdownOptions, \"indexSkill\">;\n readonly run?: {\n readonly tasks?: Readonly<Record<string, string>>;\n readonly remoteCache?: string;\n };\n}\n\ninterface SharedCache {\n readonly scripts: true;\n readonly tasks: true;\n readonly remote: { readonly url: string };\n}\n\nconst cacheOf = (remoteCache: string | undefined): SharedCache | true =>\n pipe(\n Option.fromNullishOr(remoteCache),\n Option.match({\n onNone: (): SharedCache | true => true,\n onSome: (url) => ({ scripts: true, tasks: true, remote: { url } }),\n }),\n );\n\ntype Allowed = NonNullable<NonNullable<UserConfig[\"dependencyRules\"]>[\"allowed\"]>;\n\nconst allowedIn = (\n allowances: WorkspaceSettings[\"devDependencies\"],\n field: \"dependencies\" | \"devDependencies\",\n): Allowed =>\n pipe(\n allowances,\n Rec.map(({ workspaces, dependencies }) => ({ workspaces, dependencies, fields: [field] })),\n );\n\nconst COMMIT_CONVENTION = fileURLToPath(import.meta.resolve(\"@commitlint/config-conventional\"));\n\nconst added = ({ files, excludeFiles, rules }: AddedOverride): OxlintOverride =>\n pipe(\n Option.fromUndefinedOr(excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files: [...files], rules: { ...rules } }),\n onSome: (excluded): OxlintOverride => ({\n files: [...files],\n excludeFiles: [...excluded],\n rules: { ...rules },\n }),\n }),\n );\n\nconst lintOf = ({\n workspace,\n overrides = [],\n}: RepositoryOptions): NonNullable<UserConfig[\"lint\"]> => ({\n ...preset,\n ignorePatterns: exempt,\n overrides: [\n ...preset.overrides,\n {\n files: [...workspace.lint.shadcnUi],\n rules: { \"react/jsx-props-no-spreading\": \"off\" },\n },\n {\n files: [\n ...workspace.lint.publicEntries,\n ...workspace.lint.deployEntries,\n ...workspace.lint.siteEntries,\n ],\n rules: { \"import/no-default-export\": \"off\" },\n },\n ...pipe(overrides, Arr.map(added)),\n ...workspace.lint.overrides,\n { files: [\"**/*.test.ts\"], rules: decisionTestRules },\n ],\n});\n\nexport const repositoryConfig = (options: RepositoryOptions): UserConfig => {\n const { workspace, textlint = {}, markdown = {}, run = {} } = options;\n return {\n commitlint: { extends: [COMMIT_CONVENTION] },\n dependencyRules: {\n allowed: {\n ...allowedIn(workspace.devDependencies, \"devDependencies\"),\n ...allowedIn(workspace.dependencies, \"dependencies\"),\n },\n banned: requiredStack,\n peerRanges: \"intersect\",\n },\n h56m: secretsOf(),\n wism: structureOf({\n members: workspace.members,\n ignorePatterns: exempt,\n }),\n textlint: textlintOf({\n ...textlint,\n published: workspace.publishedArticles,\n drafts: workspace.draftArticles,\n }),\n y8: markdownOf({\n ...markdown,\n indexSkill: workspace.indexSkill,\n published: workspace.publishedArticles,\n }),\n fu4: recommended(),\n test: { projects: [...workspace.testProjects], passWithNoTests: true },\n staged: { \"*\": \"vp fmt --no-error-on-unmatched-pattern\" },\n fmt: {\n ignorePatterns: exempt,\n sortImports: true,\n sortTailwindcss: true,\n sortPackageJson: true,\n },\n lint: lintOf(options),\n run: {\n cache: cacheOf(run.remoteCache),\n tasks: tasksOf({ workspace, commands: run.tasks ?? {} }),\n },\n };\n};\n"],"mappings":";;;;;;AAgDA,MAAM,WAAW,gBACf,KACE,OAAO,cAAc,WAAW,GAChC,OAAO,MAAM;CACX,cAAkC;CAClC,SAAS,SAAS;EAAE,SAAS;EAAM,OAAO;EAAM,QAAQ,EAAE,IAAI;CAAE;AAClE,CAAC,CACH;AAIF,MAAM,aACJ,YACA,UAEA,KACE,YACAA,OAAI,KAAK,EAAE,YAAY,oBAAoB;CAAE;CAAY;CAAc,QAAQ,CAAC,KAAK;AAAE,EAAE,CAC3F;AAEF,MAAM,oBAAoB,cAAc,YAAY,QAAQ,iCAAiC,CAAC;AAE9F,MAAM,SAAS,EAAE,OAAO,cAAc,YACpC,KACE,OAAO,gBAAgB,YAAY,GACnC,OAAO,MAAM;CACX,eAA+B;EAAE,OAAO,CAAC,GAAG,KAAK;EAAG,OAAO,EAAE,GAAG,MAAM;CAAE;CACxE,SAAS,cAA8B;EACrC,OAAO,CAAC,GAAG,KAAK;EAChB,cAAc,CAAC,GAAG,QAAQ;EAC1B,OAAO,EAAE,GAAG,MAAM;CACpB;AACF,CAAC,CACH;AAEF,MAAM,UAAU,EACd,WACA,YAAY,CAAC,SAC4C;CACzD,GAAGC;CACH,gBAAgB;CAChB,WAAW;EACT,GAAGA,KAAO;EACV;GACE,OAAO,CAAC,GAAG,UAAU,KAAK,QAAQ;GAClC,OAAO,EAAE,gCAAgC,MAAM;EACjD;EACA;GACE,OAAO;IACL,GAAG,UAAU,KAAK;IAClB,GAAG,UAAU,KAAK;IAClB,GAAG,UAAU,KAAK;GACpB;GACA,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA,GAAG,KAAK,WAAWC,MAAI,IAAI,KAAK,CAAC;EACjC,GAAG,UAAU,KAAK;EAClB;GAAE,OAAO,CAAC,cAAc;GAAG,OAAO;EAAkB;CACtD;AACF;AAEA,MAAa,oBAAoB,YAA2C;CAC1E,MAAM,EAAE,WAAW,WAAW,CAAC,GAAG,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM;CAC9D,OAAO;EACL,YAAY,EAAE,SAAS,CAAC,iBAAiB,EAAE;EAC3C,iBAAiB;GACf,SAAS;IACP,GAAG,UAAU,UAAU,iBAAiB,iBAAiB;IACzD,GAAG,UAAU,UAAU,cAAc,cAAc;GACrD;GACA,QAAQ;GACR,YAAY;EACd;EACA,MAAM,UAAU;EAChB,MAAM,YAAY;GAChB,SAAS,UAAU;GACnB,gBAAgB;EAClB,CAAC;EACD,UAAU,WAAW;GACnB,GAAG;GACH,WAAW,UAAU;GACrB,QAAQ,UAAU;EACpB,CAAC;EACD,IAAI,WAAW;GACb,GAAG;GACH,YAAY,UAAU;GACtB,WAAW,UAAU;EACvB,CAAC;EACD,KAAK,YAAY;EACjB,MAAM;GAAE,UAAU,CAAC,GAAG,UAAU,YAAY;GAAG,iBAAiB;EAAK;EACrE,QAAQ,EAAE,KAAK,yCAAyC;EACxD,KAAK;GACH,gBAAgB;GAChB,aAAa;GACb,iBAAiB;GACjB,iBAAiB;EACnB;EACA,MAAM,OAAO,OAAO;EACpB,KAAK;GACH,OAAO,QAAQ,IAAI,WAAW;GAC9B,OAAO,QAAQ;IAAE;IAAW,UAAU,IAAI,SAAS,CAAC;GAAE,CAAC;EACzD;CACF;AACF"}
|
|
@@ -46,6 +46,7 @@ interface WorkspaceSettings {
|
|
|
46
46
|
readonly dependencies: DependencyAllowances;
|
|
47
47
|
readonly indexSkill: Option.Option<string>;
|
|
48
48
|
readonly publishedArticles: readonly string[];
|
|
49
|
+
readonly draftArticles: readonly string[];
|
|
49
50
|
}
|
|
50
51
|
interface SettingsOptions {
|
|
51
52
|
readonly root: string;
|
|
@@ -54,4 +55,4 @@ interface SettingsOptions {
|
|
|
54
55
|
}
|
|
55
56
|
declare const workspaceSettings: (options: SettingsOptions) => Promise<WorkspaceSettings>;
|
|
56
57
|
export { WorkspaceSettings as a, DependencySets as c, WorkspaceTasks as d, WorkspaceLint as i, IgnoredDirectory as l, RuleSets as n, workspaceSettings as o, SettingsOptions as r, DependencyAllowance as s, RuleSet as t, ignoredDirectories as u };
|
|
57
|
-
//# sourceMappingURL=index-
|
|
58
|
+
//# sourceMappingURL=index-BjHoDbVQ.d.mts.map
|
package/dist/lint-rules.mjs
CHANGED
|
@@ -1394,8 +1394,8 @@ const RESOURCE_RULES = {
|
|
|
1394
1394
|
selectors: ["CallExpression[callee.object.name=/^(D1|R2)$/][callee.property.name=/^(Database|Bucket)$/]:not(CallExpression[callee.property.name=\"pipe\"][arguments.0.callee.object.name=\"RemovalPolicy\"] > MemberExpression.callee > CallExpression.object)"]
|
|
1395
1395
|
},
|
|
1396
1396
|
"stack-named-by-app": {
|
|
1397
|
-
message: "スタック名には app-name.ts の APP_NAME
|
|
1398
|
-
selectors: ["CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"])"]
|
|
1397
|
+
message: "スタック名には app-name.ts の APP_NAME か、PREFIX で始まるテンプレートリテラルを渡す",
|
|
1398
|
+
selectors: ["CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"]):not([arguments.0.type=\"TemplateLiteral\"][arguments.0.quasis.0.value.raw=\"\"][arguments.0.expressions.0.name=\"PREFIX\"])"]
|
|
1399
1399
|
},
|
|
1400
1400
|
"stack-checks-app-prefix": {
|
|
1401
1401
|
message: "スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する",
|
|
@@ -1421,7 +1421,7 @@ const TEST_HONESTY_RULES = {
|
|
|
1421
1421
|
"no-flake-masking": {
|
|
1422
1422
|
message: "再試行や flakyTest で不安定なテストを隠さない。待つ対象のイベントを await して直す",
|
|
1423
1423
|
selectors: [
|
|
1424
|
-
"Property[key.name=\"retry\"]",
|
|
1424
|
+
"Property[key.name=\"retry\"]:not([value.type=/FunctionExpression$/])",
|
|
1425
1425
|
"MemberExpression[property.name=\"retry\"]",
|
|
1426
1426
|
"MemberExpression[property.name=\"flakyTest\"]"
|
|
1427
1427
|
]
|