create-windy 0.2.1 → 0.2.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/cli.js CHANGED
@@ -697,7 +697,7 @@ var helpText = `create-windy <项目名> [选项]
697
697
  选项:
698
698
  --profile private-enterprise 单组织、单租户、私有部署 profile
699
699
  --skip-install 只生成文件,不执行 bun install
700
- --verify 安装后执行 typecheck、test 和 build
700
+ --verify 安装后执行 lint(若有)、typecheck、test 和 build
701
701
  --keep-on-error 失败时保留新生成目录用于诊断
702
702
  --module <key> 增加模块,可重复使用
703
703
  --all-modules 选择目录中的全部模块
@@ -735,11 +735,13 @@ async function runCommand(command, args, cwd) {
735
735
  });
736
736
  });
737
737
  }
738
- async function installAndVerify(targetDirectory, install, verify, execute = runCommand) {
738
+ async function installAndVerify(targetDirectory, install, verify, includeOxc, execute = runCommand) {
739
739
  if (install || verify)
740
740
  await execute("bun", ["install"], targetDirectory);
741
741
  if (!verify)
742
742
  return;
743
+ if (includeOxc)
744
+ await execute("bun", ["run", "lint"], targetDirectory);
743
745
  await execute("bun", ["run", "typecheck"], targetDirectory);
744
746
  await execute("bun", ["run", "test"], targetDirectory);
745
747
  await execute("bun", ["run", "build"], targetDirectory);
@@ -1828,7 +1830,7 @@ async function createProject(options, dependencies = {}) {
1828
1830
  stage = "检查生成物";
1829
1831
  await inspect(options.targetDirectory);
1830
1832
  stage = "安装与验证";
1831
- await installAndVerify(options.targetDirectory, options.install, options.verify, dependencies.commandExecutor);
1833
+ await installAndVerify(options.targetDirectory, options.install, options.verify, options.includeOxc, dependencies.commandExecutor);
1832
1834
  } catch (error) {
1833
1835
  await rollbackFailedTarget(options, targetState);
1834
1836
  throw stageError(stage, error);
@@ -3828,7 +3830,8 @@ async function diagnoseProject(projectDirectory, repair = false) {
3828
3830
  var recipes = [
3829
3831
  { id: "starter-0.1.1-to-0.1.2", from: "0.1.1", to: "0.1.2" },
3830
3832
  { id: "starter-0.1.2-to-0.2.0", from: "0.1.2", to: "0.2.0" },
3831
- { id: "starter-0.2.0-to-0.2.1", from: "0.2.0", to: "0.2.1" }
3833
+ { id: "starter-0.2.0-to-0.2.1", from: "0.2.0", to: "0.2.1" },
3834
+ { id: "starter-0.2.1-to-0.2.2", from: "0.2.1", to: "0.2.2" }
3832
3835
  ];
3833
3836
  function resolveRecipeChain(sourceVersion, targetVersion) {
3834
3837
  if (sourceVersion === targetVersion)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-windy",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "创建单组织、单租户、私有部署优先的 Windy 企业 Dashboard Starter",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "templateCommit": "2ea424d9bb8c8f9ae0bdd94c101052684dfb5880",
4
- "generatorVersion": "0.2.1",
3
+ "templateCommit": "10f8ff1e60df1d1e0f96614c735ee6c0133a4c1f",
4
+ "generatorVersion": "0.2.2",
5
5
  "modules": [
6
6
  {
7
7
  "name": "system",
@@ -35,6 +35,6 @@
35
35
 
36
36
  - `bun run dev:web`:启动 Web 开发服务。
37
37
  - `bun run dev:server`:启动 Server 开发服务。
38
- - `bun run typecheck`、`bun run test`、`bun run build`:执行基础验证。
38
+ - `bun run lint`、`bun run typecheck`、`bun run test`、`bun run build`:执行基础验证;未选择 Oxc 时没有 lint 脚本。
39
39
  - `docs/README.md`:平台架构、模块接入和运维文档入口。
40
40
  - `.windy/generation.json`:本次生成器版本、所选模块和选项记录。
@@ -8,12 +8,15 @@ import {
8
8
  } from "./license/restriction.js";
9
9
  // @windy-module system.license end
10
10
 
11
+ interface RequestRestrictionRuntime {
12
+ readonly __requestRestrictionRuntime?: never;
13
+ // @windy-module system.license begin
14
+ recordDecisions(decisions: GuardDecision[]): void;
15
+ // @windy-module system.license end
16
+ }
17
+
11
18
  export function restrictedRequestResponse(
12
- runtime: {
13
- // @windy-module system.license begin
14
- recordDecisions(decisions: GuardDecision[]): void;
15
- // @windy-module system.license end
16
- },
19
+ runtime: RequestRestrictionRuntime,
17
20
  context: RequestGuardContext,
18
21
  request: Request,
19
22
  ): Response | undefined {
@@ -26,9 +26,11 @@ import {
26
26
  array,
27
27
  auditEntity,
28
28
  auditRow,
29
+ // @windy-module system.license begin
29
30
  date,
30
31
  iso,
31
32
  optionalIso,
33
+ // @windy-module system.license end
32
34
  pick,
33
35
  } from "./drizzle-mapping.js";
34
36
  import {
@@ -1,5 +1,10 @@
1
1
  import { describe, expect, test } from "bun:test";
2
- import { entitlementKey, type FeatureFlagDefinition } from "@windy/shared";
2
+ import {
3
+ // @windy-module system.license begin
4
+ entitlementKey,
5
+ // @windy-module system.license end
6
+ type FeatureFlagDefinition,
7
+ } from "@windy/shared";
3
8
  import { createFoundationSnapshot } from "../foundation.js";
4
9
  import { createServerRuntime, type AuditEventWriter } from "../runtime.js";
5
10
  import { FakeRouteApp } from "./route-test-app.js";
@@ -1,4 +1,6 @@
1
+ // @windy-module system.license begin
1
2
  import { sql } from "drizzle-orm";
3
+ // @windy-module system.license end
2
4
  import {
3
5
  boolean,
4
6
  index,
@@ -6,7 +8,9 @@ import {
6
8
  pgTable,
7
9
  text,
8
10
  timestamp,
11
+ // @windy-module system.license begin
9
12
  uniqueIndex,
13
+ // @windy-module system.license end
10
14
  varchar,
11
15
  } from "drizzle-orm/pg-core";
12
16
  import { auditColumns, idColumn, statusColumn } from "./common.js";
@@ -48,6 +48,7 @@ import {
48
48
 
49
49
  describe("database schema", () => {
50
50
  test("feature_flags 保持完整审计和软删除字段", () => {
51
+ expect(getTableConfig(featureFlags).name).toBe("feature_flags");
51
52
  expect("createdAt" in featureFlags).toBe(true);
52
53
  expect("createdBy" in featureFlags).toBe(true);
53
54
  expect("updatedAt" in featureFlags).toBe(true);
@@ -1,7 +1,9 @@
1
1
  import { featureKey, licenseVersionKey } from "@windy/shared";
2
2
  import type { ModuleManifest } from "./manifest.js";
3
3
 
4
+ // @windy-module system.scheduler begin
4
5
  const standardAndAdvanced = ["standard", "advanced"].map(licenseVersionKey);
6
+ // @windy-module system.scheduler end
5
7
  const advancedOnly = [licenseVersionKey("advanced")];
6
8
 
7
9
  export const systemFeatures: ModuleManifest["features"] = [
@@ -2,7 +2,9 @@ import { describe, expect, test } from "bun:test";
2
2
  import { validateModuleComposition } from "./composition.js";
3
3
  import { composeModuleMenus } from "./menu-composition.js";
4
4
  import {
5
+ // @windy-module system.data-governance begin
5
6
  systemModuleManifest,
7
+ // @windy-module system.data-governance end
6
8
  systemModuleManifests,
7
9
  } from "./system-module-catalog.js";
8
10
  import { systemFoundationModule } from "./system-modules.js";