create-windy 0.6.1 → 0.6.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
|
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
33
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
34
|
var __require = import.meta.require;
|
|
35
35
|
|
|
36
|
-
// ../../node_modules
|
|
36
|
+
// ../../node_modules/cli-width/index.js
|
|
37
37
|
var require_cli_width = __commonJS((exports, module2) => {
|
|
38
38
|
module2.exports = cliWidth;
|
|
39
39
|
function normalizeOpts(options) {
|
|
@@ -73,7 +73,7 @@ var require_cli_width = __commonJS((exports, module2) => {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// ../../node_modules
|
|
76
|
+
// ../../node_modules/mute-stream/lib/index.js
|
|
77
77
|
var require_lib = __commonJS((exports, module2) => {
|
|
78
78
|
var Stream = __require("stream");
|
|
79
79
|
|
|
@@ -3554,6 +3554,10 @@ var defaultLintStaged = {
|
|
|
3554
3554
|
"*.{css,html,json,jsonc,less,md,mdx,scss,yaml,yml}": "oxfmt --write",
|
|
3555
3555
|
"*.{cjs,cts,js,jsx,mjs,mts,ts,tsx,vue}": ["oxfmt --write", "oxlint"]
|
|
3556
3556
|
};
|
|
3557
|
+
var migrationCliDependencies = {
|
|
3558
|
+
"drizzle-orm": "^0.45.2",
|
|
3559
|
+
pg: "^8.22.0"
|
|
3560
|
+
};
|
|
3557
3561
|
function createStarterPackage(source, projectName, includeOxc = true, projectLicense = "UNLICENSED", selectedModules = [], generatorVersion) {
|
|
3558
3562
|
const { "lint-staged": sourceLintStaged, ...sourceWithoutLintStaged } = source;
|
|
3559
3563
|
const devDependencies = { ...source.devDependencies };
|
|
@@ -3613,6 +3617,7 @@ function createStarterPackage(source, projectName, includeOxc = true, projectLic
|
|
|
3613
3617
|
test: "bun test && bun run --cwd apps/web test"
|
|
3614
3618
|
},
|
|
3615
3619
|
devDependencies: {
|
|
3620
|
+
...migrationCliDependencies,
|
|
3616
3621
|
...devDependencies,
|
|
3617
3622
|
...generatorVersion ? { "create-windy": generatorVersion } : {}
|
|
3618
3623
|
}
|
|
@@ -4224,7 +4229,7 @@ function isMissing6(error) {
|
|
|
4224
4229
|
import { createInterface as createInterface2 } from "readline/promises";
|
|
4225
4230
|
import { stdin, stdout } from "process";
|
|
4226
4231
|
|
|
4227
|
-
// ../../node_modules
|
|
4232
|
+
// ../../node_modules/@inquirer/core/dist/lib/key.js
|
|
4228
4233
|
var keybindings = ["emacs", "vim"];
|
|
4229
4234
|
var keybindingLookup = new Set(keybindings);
|
|
4230
4235
|
function isKeybinding(value) {
|
|
@@ -4241,7 +4246,7 @@ var isDownKey = (key, keybindings2 = []) => key.name === "down" || keybindings2.
|
|
|
4241
4246
|
var isSpaceKey = (key) => key.name === "space";
|
|
4242
4247
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
4243
4248
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
4244
|
-
// ../../node_modules
|
|
4249
|
+
// ../../node_modules/@inquirer/core/dist/lib/errors.js
|
|
4245
4250
|
class AbortPromptError extends Error {
|
|
4246
4251
|
name = "AbortPromptError";
|
|
4247
4252
|
message = "Prompt was aborted";
|
|
@@ -4267,10 +4272,10 @@ class HookError extends Error {
|
|
|
4267
4272
|
class ValidationError extends Error {
|
|
4268
4273
|
name = "ValidationError";
|
|
4269
4274
|
}
|
|
4270
|
-
// ../../node_modules
|
|
4275
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-state.js
|
|
4271
4276
|
import { AsyncResource as AsyncResource2 } from "async_hooks";
|
|
4272
4277
|
|
|
4273
|
-
// ../../node_modules
|
|
4278
|
+
// ../../node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
4274
4279
|
import { AsyncLocalStorage, AsyncResource } from "async_hooks";
|
|
4275
4280
|
var hookStorage = new AsyncLocalStorage;
|
|
4276
4281
|
function createStore(rl) {
|
|
@@ -4375,7 +4380,7 @@ var effectScheduler = {
|
|
|
4375
4380
|
}
|
|
4376
4381
|
};
|
|
4377
4382
|
|
|
4378
|
-
// ../../node_modules
|
|
4383
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-state.js
|
|
4379
4384
|
function isFactory(value) {
|
|
4380
4385
|
return typeof value === "function";
|
|
4381
4386
|
}
|
|
@@ -4396,7 +4401,7 @@ function useState(defaultValue) {
|
|
|
4396
4401
|
});
|
|
4397
4402
|
}
|
|
4398
4403
|
|
|
4399
|
-
// ../../node_modules
|
|
4404
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
4400
4405
|
function useEffect(cb, depArray) {
|
|
4401
4406
|
withPointer((pointer) => {
|
|
4402
4407
|
const oldDeps = pointer.get();
|
|
@@ -4408,10 +4413,10 @@ function useEffect(cb, depArray) {
|
|
|
4408
4413
|
});
|
|
4409
4414
|
}
|
|
4410
4415
|
|
|
4411
|
-
// ../../node_modules
|
|
4416
|
+
// ../../node_modules/@inquirer/core/dist/lib/theme.js
|
|
4412
4417
|
import { styleText } from "util";
|
|
4413
4418
|
|
|
4414
|
-
// ../../node_modules
|
|
4419
|
+
// ../../node_modules/@inquirer/figures/dist/index.js
|
|
4415
4420
|
import process2 from "process";
|
|
4416
4421
|
function isUnicodeSupported() {
|
|
4417
4422
|
if (!process2.platform.startsWith("win")) {
|
|
@@ -4700,7 +4705,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
4700
4705
|
var dist_default = figures;
|
|
4701
4706
|
var replacements = Object.entries(specialMainSymbols);
|
|
4702
4707
|
|
|
4703
|
-
// ../../node_modules
|
|
4708
|
+
// ../../node_modules/@inquirer/core/dist/lib/theme.js
|
|
4704
4709
|
var defaultTheme = {
|
|
4705
4710
|
prefix: {
|
|
4706
4711
|
idle: styleText("blue", "?"),
|
|
@@ -4728,7 +4733,7 @@ function getDefaultTheme() {
|
|
|
4728
4733
|
};
|
|
4729
4734
|
}
|
|
4730
4735
|
|
|
4731
|
-
// ../../node_modules
|
|
4736
|
+
// ../../node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
4732
4737
|
function isPlainObject(value) {
|
|
4733
4738
|
if (typeof value !== "object" || value === null)
|
|
4734
4739
|
return false;
|
|
@@ -4756,7 +4761,7 @@ function makeTheme(...themes) {
|
|
|
4756
4761
|
return deepMerge(...themesToMerge);
|
|
4757
4762
|
}
|
|
4758
4763
|
|
|
4759
|
-
// ../../node_modules
|
|
4764
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
4760
4765
|
function usePrefix({ status = "idle", theme }) {
|
|
4761
4766
|
const [showLoader, setShowLoader] = useState(false);
|
|
4762
4767
|
const [tick, setTick] = useState(0);
|
|
@@ -4786,7 +4791,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
4786
4791
|
const iconName = status === "loading" ? "idle" : status;
|
|
4787
4792
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
4788
4793
|
}
|
|
4789
|
-
// ../../node_modules
|
|
4794
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
4790
4795
|
function useMemo(fn, dependencies) {
|
|
4791
4796
|
return withPointer((pointer) => {
|
|
4792
4797
|
const prev = pointer.get();
|
|
@@ -4798,12 +4803,12 @@ function useMemo(fn, dependencies) {
|
|
|
4798
4803
|
return prev.value;
|
|
4799
4804
|
});
|
|
4800
4805
|
}
|
|
4801
|
-
// ../../node_modules
|
|
4806
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
4802
4807
|
function useRef(val) {
|
|
4803
4808
|
return useState({ current: val })[0];
|
|
4804
4809
|
}
|
|
4805
4810
|
|
|
4806
|
-
// ../../node_modules
|
|
4811
|
+
// ../../node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
4807
4812
|
function useKeypress(userHandler) {
|
|
4808
4813
|
const signal = useRef(userHandler);
|
|
4809
4814
|
signal.current = userHandler;
|
|
@@ -4821,10 +4826,10 @@ function useKeypress(userHandler) {
|
|
|
4821
4826
|
};
|
|
4822
4827
|
}, []);
|
|
4823
4828
|
}
|
|
4824
|
-
// ../../node_modules
|
|
4829
|
+
// ../../node_modules/@inquirer/core/dist/lib/utils.js
|
|
4825
4830
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
4826
4831
|
|
|
4827
|
-
// ../../node_modules
|
|
4832
|
+
// ../../node_modules/fast-string-truncated-width/dist/utils.js
|
|
4828
4833
|
var getCodePointsLength = (() => {
|
|
4829
4834
|
const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
4830
4835
|
return (input) => {
|
|
@@ -4843,7 +4848,7 @@ var isWideNotCJKTNotEmoji = (x) => {
|
|
|
4843
4848
|
return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
4844
4849
|
};
|
|
4845
4850
|
|
|
4846
|
-
// ../../node_modules
|
|
4851
|
+
// ../../node_modules/fast-string-truncated-width/dist/index.js
|
|
4847
4852
|
var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
|
|
4848
4853
|
var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
4849
4854
|
var CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;
|
|
@@ -4942,7 +4947,7 @@ var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {})
|
|
|
4942
4947
|
};
|
|
4943
4948
|
var dist_default2 = getStringTruncatedWidth;
|
|
4944
4949
|
|
|
4945
|
-
// ../../node_modules
|
|
4950
|
+
// ../../node_modules/fast-string-width/dist/index.js
|
|
4946
4951
|
var NO_TRUNCATION2 = {
|
|
4947
4952
|
limit: Infinity,
|
|
4948
4953
|
ellipsis: "",
|
|
@@ -4953,7 +4958,7 @@ var fastStringWidth = (input, options = {}) => {
|
|
|
4953
4958
|
};
|
|
4954
4959
|
var dist_default3 = fastStringWidth;
|
|
4955
4960
|
|
|
4956
|
-
// ../../node_modules
|
|
4961
|
+
// ../../node_modules/fast-wrap-ansi/lib/main.js
|
|
4957
4962
|
var ESC = "\x1B";
|
|
4958
4963
|
var CSI = "\x9B";
|
|
4959
4964
|
var END_CODE = 39;
|
|
@@ -5165,7 +5170,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
5165
5170
|
`);
|
|
5166
5171
|
}
|
|
5167
5172
|
|
|
5168
|
-
// ../../node_modules
|
|
5173
|
+
// ../../node_modules/@inquirer/core/dist/lib/utils.js
|
|
5169
5174
|
function breakLines(content, width) {
|
|
5170
5175
|
return content.split(`
|
|
5171
5176
|
`).flatMap((line) => wrapAnsi(line, width, { trim: false, wordWrap: false }).split(`
|
|
@@ -5176,7 +5181,7 @@ function readlineWidth() {
|
|
|
5176
5181
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
5177
5182
|
}
|
|
5178
5183
|
|
|
5179
|
-
// ../../node_modules
|
|
5184
|
+
// ../../node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
5180
5185
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
5181
5186
|
const state = useRef({
|
|
5182
5187
|
lastPointer: active,
|
|
@@ -5242,12 +5247,12 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
5242
5247
|
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
5243
5248
|
`);
|
|
5244
5249
|
}
|
|
5245
|
-
// ../../node_modules
|
|
5250
|
+
// ../../node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
5246
5251
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
5247
5252
|
import * as readline2 from "readline";
|
|
5248
5253
|
import { AsyncResource as AsyncResource3 } from "async_hooks";
|
|
5249
5254
|
|
|
5250
|
-
// ../../node_modules
|
|
5255
|
+
// ../../node_modules/signal-exit/dist/mjs/signals.js
|
|
5251
5256
|
var signals = [];
|
|
5252
5257
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
5253
5258
|
if (process.platform !== "win32") {
|
|
@@ -5257,7 +5262,7 @@ if (process.platform === "linux") {
|
|
|
5257
5262
|
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
5258
5263
|
}
|
|
5259
5264
|
|
|
5260
|
-
// ../../node_modules
|
|
5265
|
+
// ../../node_modules/signal-exit/dist/mjs/index.js
|
|
5261
5266
|
var processOk = (process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
5262
5267
|
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
5263
5268
|
var global = globalThis;
|
|
@@ -5455,10 +5460,10 @@ var {
|
|
|
5455
5460
|
unload
|
|
5456
5461
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
5457
5462
|
|
|
5458
|
-
// ../../node_modules
|
|
5463
|
+
// ../../node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
5459
5464
|
import { stripVTControlCharacters } from "util";
|
|
5460
5465
|
|
|
5461
|
-
// ../../node_modules
|
|
5466
|
+
// ../../node_modules/@inquirer/ansi/dist/index.js
|
|
5462
5467
|
var ESC2 = "\x1B[";
|
|
5463
5468
|
var cursorLeft = ESC2 + "G";
|
|
5464
5469
|
var cursorHide = ESC2 + "?25l";
|
|
@@ -5474,7 +5479,7 @@ var cursorTo = (x, y) => {
|
|
|
5474
5479
|
var eraseLine = ESC2 + "2K";
|
|
5475
5480
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
5476
5481
|
|
|
5477
|
-
// ../../node_modules
|
|
5482
|
+
// ../../node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
5478
5483
|
var height = (content) => content.split(`
|
|
5479
5484
|
`).length;
|
|
5480
5485
|
var lastLine = (content) => content.split(`
|
|
@@ -5540,7 +5545,7 @@ class ScreenManager {
|
|
|
5540
5545
|
}
|
|
5541
5546
|
}
|
|
5542
5547
|
|
|
5543
|
-
// ../../node_modules
|
|
5548
|
+
// ../../node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
5544
5549
|
class PromisePolyfill extends Promise {
|
|
5545
5550
|
static withResolver() {
|
|
5546
5551
|
let resolve6;
|
|
@@ -5553,7 +5558,7 @@ class PromisePolyfill extends Promise {
|
|
|
5553
5558
|
}
|
|
5554
5559
|
}
|
|
5555
5560
|
|
|
5556
|
-
// ../../node_modules
|
|
5561
|
+
// ../../node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
5557
5562
|
import path from "path";
|
|
5558
5563
|
var nativeSetImmediate = globalThis.setImmediate;
|
|
5559
5564
|
function getCallSites() {
|
|
@@ -5664,7 +5669,7 @@ function createPrompt(view) {
|
|
|
5664
5669
|
};
|
|
5665
5670
|
return prompt;
|
|
5666
5671
|
}
|
|
5667
|
-
// ../../node_modules
|
|
5672
|
+
// ../../node_modules/@inquirer/core/dist/lib/Separator.js
|
|
5668
5673
|
import { styleText as styleText2 } from "util";
|
|
5669
5674
|
class Separator {
|
|
5670
5675
|
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
@@ -5678,7 +5683,7 @@ class Separator {
|
|
|
5678
5683
|
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
5679
5684
|
}
|
|
5680
5685
|
}
|
|
5681
|
-
// ../../node_modules
|
|
5686
|
+
// ../../node_modules/@inquirer/checkbox/dist/index.js
|
|
5682
5687
|
import { styleText as styleText3 } from "util";
|
|
5683
5688
|
var checkboxTheme = {
|
|
5684
5689
|
icon: {
|
|
@@ -7752,6 +7757,11 @@ var recipes = [
|
|
|
7752
7757
|
id: "starter-0.6.0-to-0.6.1",
|
|
7753
7758
|
from: "0.6.0",
|
|
7754
7759
|
to: "0.6.1"
|
|
7760
|
+
},
|
|
7761
|
+
{
|
|
7762
|
+
id: "starter-0.6.1-to-0.6.2",
|
|
7763
|
+
from: "0.6.1",
|
|
7764
|
+
to: "0.6.2"
|
|
7755
7765
|
}
|
|
7756
7766
|
];
|
|
7757
7767
|
function resolveRecipeChain(sourceVersion, targetVersion) {
|
|
@@ -10493,11 +10503,15 @@ function actionLabel(action) {
|
|
|
10493
10503
|
}
|
|
10494
10504
|
|
|
10495
10505
|
// src/update/cli.ts
|
|
10496
|
-
async function runLifecycleCommand(args) {
|
|
10506
|
+
async function runLifecycleCommand(args, dependencies = {}) {
|
|
10497
10507
|
const command = args[0];
|
|
10498
10508
|
if (command !== "doctor" && command !== "update" && command !== "module" && command !== "sync-docker") {
|
|
10499
10509
|
return false;
|
|
10500
10510
|
}
|
|
10511
|
+
if (command === "update" && (args.includes("--help") || args.includes("-h"))) {
|
|
10512
|
+
(dependencies.log || console.log)(updateHelpText);
|
|
10513
|
+
return true;
|
|
10514
|
+
}
|
|
10501
10515
|
const projectDirectory = resolve8(readValue3(args, "--cwd") || process.cwd());
|
|
10502
10516
|
if (command === "module") {
|
|
10503
10517
|
await runModuleLifecycleCommand(args.slice(1), projectDirectory);
|
|
@@ -10551,9 +10565,20 @@ async function runLifecycleCommand(args) {
|
|
|
10551
10565
|
}
|
|
10552
10566
|
return true;
|
|
10553
10567
|
}
|
|
10554
|
-
await runUpdate(args, projectDirectory);
|
|
10568
|
+
await (dependencies.runUpdate || runUpdate)(args, projectDirectory);
|
|
10555
10569
|
return true;
|
|
10556
10570
|
}
|
|
10571
|
+
var updateHelpText = `\u7528\u6CD5\uFF1Acreate-windy update [\u9009\u9879]
|
|
10572
|
+
|
|
10573
|
+
\u9009\u9879\uFF1A
|
|
10574
|
+
--check \u68C0\u67E5\u662F\u5426\u5B58\u5728\u53EF\u7528\u66F4\u65B0
|
|
10575
|
+
--dry-run \u751F\u6210\u8BA1\u5212\u4F46\u4E0D\u5199\u5165\u9879\u76EE\u6587\u4EF6
|
|
10576
|
+
--to <\u7248\u672C> \u66F4\u65B0\u5230\u6307\u5B9A\u7248\u672C
|
|
10577
|
+
--cwd <\u76EE\u5F55> \u6307\u5B9A\u9879\u76EE\u76EE\u5F55
|
|
10578
|
+
--skip-install \u66F4\u65B0\u65F6\u4E0D\u6267\u884C bun install
|
|
10579
|
+
--force \u5F3A\u5236\u91C7\u7528\u5E73\u53F0\u57FA\u7EBF\u53C2\u4E0E\u4E09\u65B9\u5408\u5E76
|
|
10580
|
+
-h, --help \u663E\u793A update \u5E2E\u52A9\u5E76\u9000\u51FA
|
|
10581
|
+
`;
|
|
10557
10582
|
async function runUpdate(args, projectDirectory) {
|
|
10558
10583
|
const template = await readTemplateMetadata(await resolveTemplateRoot());
|
|
10559
10584
|
const requested = readValue3(args, "--to");
|
package/package.json
CHANGED
package/template/_bunfig.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# syntax=docker/dockerfile:1
|
|
2
2
|
|
|
3
|
-
FROM oven/bun:1.3.14
|
|
3
|
+
FROM oven/bun:1.3.14 AS deps
|
|
4
4
|
WORKDIR /app
|
|
5
5
|
|
|
6
6
|
COPY package.json bun.lock ./
|
|
@@ -23,12 +23,16 @@ COPY packages/server-sdk/package.json packages/server-sdk/package.json
|
|
|
23
23
|
COPY packages/shared/package.json packages/shared/package.json
|
|
24
24
|
COPY packages/storage/package.json packages/storage/package.json
|
|
25
25
|
# windy-copy:deps end
|
|
26
|
-
RUN --mount=type=cache,id=windy-bun-1.3.14,target=/root/.bun/install/cache,sharing=shared bun -e 'const child=Bun.spawn(["bun","install","--frozen-lockfile","--no-progress"],{stdin:"inherit",stdout:"inherit",stderr:"inherit"});const heartbeat=setInterval(()=>console.log("[windy] Bun 依赖安装仍在进行"),15000);const exitCode=await child.exited;clearInterval(heartbeat);process.exit(exitCode)'
|
|
26
|
+
RUN --mount=type=cache,id=windy-bun-1.3.14,target=/root/.bun/install/cache,sharing=shared bun -e 'const child=Bun.spawn(["bun","install","--frozen-lockfile","--no-progress","--backend=copyfile","--linker=hoisted"],{stdin:"inherit",stdout:"inherit",stderr:"inherit"});const heartbeat=setInterval(()=>console.log("[windy] Bun 依赖安装仍在进行"),15000);const exitCode=await child.exited;clearInterval(heartbeat);process.exit(exitCode)'
|
|
27
27
|
|
|
28
28
|
FROM deps AS runner
|
|
29
29
|
# @windy-module system.storage begin
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
# The native archive helper needs a compiler. Avoid Alpine apk here: its source
|
|
31
|
+
# transfer can stall indefinitely under cross-architecture BuildKit emulation.
|
|
32
|
+
RUN set -eu; \
|
|
33
|
+
if ! timeout --kill-after=5s 90s sh -c 'apt-get update -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o Acquire::Retries=0 && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes build-essential libarchive-dev libarchive-tools'; then \
|
|
34
|
+
echo "APT 包源不可用或 90 秒总时限已到:无法安装 report-staging 依赖" >&2; exit 70; \
|
|
35
|
+
fi
|
|
32
36
|
# @windy-module system.storage end
|
|
33
37
|
COPY drizzle.config.ts drizzle.config.ts
|
|
34
38
|
COPY apps/server apps/server
|
|
@@ -40,7 +44,8 @@ RUN cc -std=c11 -O2 -Wall -Wextra -Werror \
|
|
|
40
44
|
&& strip /usr/local/bin/windy-report-archive-stream \
|
|
41
45
|
&& chown root:root /usr/local/bin/windy-report-archive-stream \
|
|
42
46
|
&& chmod 0555 /usr/local/bin/windy-report-archive-stream \
|
|
43
|
-
&&
|
|
47
|
+
&& apt-get purge --auto-remove --yes build-essential libarchive-dev \
|
|
48
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
44
49
|
# @windy-module system.storage end
|
|
45
50
|
COPY --chmod=0555 deploy/production/server-entrypoint.sh /usr/local/bin/windy-server-entrypoint
|
|
46
51
|
RUN mkdir -p /app/data/audit /app/data/license && chown -R bun:bun /app/data
|
|
@@ -23,7 +23,7 @@ COPY packages/server-sdk/package.json packages/server-sdk/package.json
|
|
|
23
23
|
COPY packages/shared/package.json packages/shared/package.json
|
|
24
24
|
COPY packages/storage/package.json packages/storage/package.json
|
|
25
25
|
# windy-copy:deps end
|
|
26
|
-
RUN --mount=type=cache,id=windy-bun-1.3.14,target=/root/.bun/install/cache,sharing=shared bun -e 'const child=Bun.spawn(["bun","install","--frozen-lockfile","--no-progress"],{stdin:"inherit",stdout:"inherit",stderr:"inherit"});const heartbeat=setInterval(()=>console.log("[windy] Bun 依赖安装仍在进行"),15000);const exitCode=await child.exited;clearInterval(heartbeat);process.exit(exitCode)'
|
|
26
|
+
RUN --mount=type=cache,id=windy-bun-1.3.14,target=/root/.bun/install/cache,sharing=shared bun -e 'const child=Bun.spawn(["bun","install","--frozen-lockfile","--no-progress","--backend=copyfile","--linker=hoisted"],{stdin:"inherit",stdout:"inherit",stderr:"inherit"});const heartbeat=setInterval(()=>console.log("[windy] Bun 依赖安装仍在进行"),15000);const exitCode=await child.exited;clearInterval(heartbeat);process.exit(exitCode)'
|
|
27
27
|
|
|
28
28
|
FROM deps AS build
|
|
29
29
|
# windy-copy:build begin
|
package/template/package.json
CHANGED
|
@@ -83,10 +83,12 @@
|
|
|
83
83
|
"@types/bun": "^1.3.14",
|
|
84
84
|
"@types/pg": "^8.20.0",
|
|
85
85
|
"drizzle-kit": "^0.31.10",
|
|
86
|
+
"drizzle-orm": "^0.45.2",
|
|
86
87
|
"husky": "^9.1.7",
|
|
87
88
|
"lint-staged": "^17.1.1",
|
|
88
89
|
"oxfmt": "^0.59.0",
|
|
89
90
|
"oxlint": "^1.74.0",
|
|
91
|
+
"pg": "^8.22.0",
|
|
90
92
|
"typescript": "5.9.3"
|
|
91
93
|
},
|
|
92
94
|
"dependencies": {}
|