@_linked/cli 1.4.1 → 1.4.3
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/CHANGELOG.md +14 -0
- package/defaults/app-static/src/index-static.tsx +22 -0
- package/defaults/app-with-backend/package.json +1 -1
- package/defaults/app-with-backend/src/App.module.css +32 -0
- package/defaults/app-with-backend/src/App.tsx +30 -0
- package/defaults/app-with-backend/src/backend.ts +9 -0
- package/defaults/app-with-backend/src/components/Error.module.css +9 -0
- package/defaults/app-with-backend/src/components/Error.tsx +11 -0
- package/defaults/app-with-backend/src/components/PersonOverview.module.css +100 -0
- package/defaults/app-with-backend/src/components/PersonOverview.tsx +97 -0
- package/defaults/app-with-backend/src/components/PersonOverviewContext.tsx +12 -0
- package/defaults/app-with-backend/src/components/PersonPreview.module.css +97 -0
- package/defaults/app-with-backend/src/components/PersonPreview.tsx +107 -0
- package/defaults/app-with-backend/src/components/Spinner.module.css +17 -0
- package/defaults/app-with-backend/src/components/Spinner.tsx +12 -0
- package/defaults/app-with-backend/src/index.tsx +34 -0
- package/defaults/app-with-backend/src/layout/DefaultLayout.module.css +15 -0
- package/defaults/app-with-backend/src/layout/DefaultLayout.tsx +12 -0
- package/defaults/app-with-backend/src/layout/Header.module.css +46 -0
- package/defaults/app-with-backend/src/layout/Header.tsx +27 -0
- package/defaults/app-with-backend/src/linked.frontend.datasets.json +12 -0
- package/defaults/app-with-backend/src/linked.frontend.storage.ts +36 -0
- package/defaults/app-with-backend/src/package.ts +12 -0
- package/defaults/app-with-backend/src/pages/Home.module.css +23 -0
- package/defaults/app-with-backend/src/pages/Home.tsx +14 -0
- package/defaults/app-with-backend/src/pages/Page1.module.css +18 -0
- package/defaults/app-with-backend/src/pages/Page1.tsx +16 -0
- package/defaults/app-with-backend/src/pages/PageNotFound.module.css +19 -0
- package/defaults/app-with-backend/src/pages/PageNotFound.tsx +14 -0
- package/defaults/app-with-backend/src/pages/Signin.module.css +20 -0
- package/defaults/app-with-backend/src/pages/Signin.tsx +16 -0
- package/defaults/app-with-backend/src/routes.tsx +85 -0
- package/defaults/app-with-backend/src/theme.css +91 -0
- package/defaults/app-with-backend/src/types.ts +14 -0
- package/defaults/app-with-backend/src/utils/lazyWithPreload.tsx +42 -0
- package/defaults/app-with-backend/src/utils/preloadRoutes.ts +38 -0
- package/defaults/app-with-backend/tsconfig.json +24 -0
- package/lib/cjs/cli-deprecated.d.ts +2 -0
- package/lib/cjs/cli-methods.d.ts +67 -0
- package/lib/cjs/cli.d.ts +3 -0
- package/lib/cjs/commands/build-package.d.ts +9 -0
- package/lib/cjs/commands/safe-yarn.d.ts +10 -0
- package/lib/cjs/commands/setup-publish.d.ts +23 -0
- package/lib/cjs/config-webpack-app.d.ts +112 -0
- package/lib/cjs/config-webpack.d.ts +55 -0
- package/lib/cjs/defineConfig.d.ts +8 -0
- package/lib/cjs/index.d.ts +12 -0
- package/lib/cjs/interfaces.d.ts +131 -0
- package/lib/cjs/loaders/register-css-only.d.ts +2 -0
- package/lib/cjs/loaders/register.d.ts +2 -0
- package/lib/cjs/metadata.d.ts +1 -0
- package/lib/cjs/package.json +1 -1
- package/lib/cjs/plugins/check-imports.d.ts +2 -0
- package/lib/cjs/plugins/declaration-plugin.d.ts +15 -0
- package/lib/cjs/plugins/externalise-modules.d.ts +7 -0
- package/lib/cjs/plugins/lincd-tailwind-sources.d.ts +3 -0
- package/lib/cjs/plugins/watch-run.d.ts +5 -0
- package/lib/cjs/tailwind.config.d.ts +8 -0
- package/lib/cjs/utils.d.ts +77 -0
- package/lib/esm/cli-deprecated.d.ts +2 -0
- package/lib/esm/cli-methods.d.ts +67 -0
- package/lib/esm/cli.d.ts +3 -0
- package/lib/esm/commands/build-package.d.ts +9 -0
- package/lib/esm/commands/safe-yarn.d.ts +10 -0
- package/lib/esm/commands/setup-publish.d.ts +23 -0
- package/lib/esm/config-webpack-app.d.ts +112 -0
- package/lib/esm/config-webpack.d.ts +55 -0
- package/lib/esm/defineConfig.d.ts +8 -0
- package/lib/esm/index.d.ts +12 -0
- package/lib/esm/interfaces.d.ts +131 -0
- package/lib/esm/launch.d.ts +3 -0
- package/lib/esm/loaders/register-css-only.d.ts +2 -0
- package/lib/esm/loaders/register.d.ts +2 -0
- package/lib/esm/metadata.d.ts +1 -0
- package/lib/esm/package.json +1 -1
- package/lib/esm/plugins/check-imports.d.ts +2 -0
- package/lib/esm/plugins/declaration-plugin.d.ts +15 -0
- package/lib/esm/plugins/externalise-modules.d.ts +7 -0
- package/lib/esm/plugins/lincd-tailwind-sources.d.ts +3 -0
- package/lib/esm/plugins/watch-run.d.ts +5 -0
- package/lib/esm/tailwind.config.d.ts +8 -0
- package/lib/esm/utils.d.ts +77 -0
- package/package.json +1 -1
- package/tests/e2e/create-app.spec.ts +157 -0
- package/tests/unit/safeYarn.test.ts +55 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given any file or directory path, walk up to find the nearest package.json
|
|
3
|
+
* and run `linked build` in that package's directory. This is the editor-hook
|
|
4
|
+
* variant of build: the caller knows a file path, we figure out the package.
|
|
5
|
+
*
|
|
6
|
+
* Only rebuilds packages flagged `linkedPackage: true` (or legacy `lincd: true`).
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildPackageByPath(filePath: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=build-package.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run a yarn command at the workspace root while preserving nested repositories'
|
|
3
|
+
* yarn.lock files. Used when the workspace contains sibling repos (via mrgit)
|
|
4
|
+
* whose own lockfiles should not be clobbered by a root-level `yarn install`.
|
|
5
|
+
*
|
|
6
|
+
* Reads mrgit.json to determine which nested repos exist. If mrgit.json is
|
|
7
|
+
* missing, falls back to plain yarn behavior.
|
|
8
|
+
*/
|
|
9
|
+
export declare function safeYarn(args: string[]): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=safe-yarn.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SetupPublishOptions = {
|
|
2
|
+
configureGithub?: boolean;
|
|
3
|
+
scope?: 'core' | 'community';
|
|
4
|
+
dualBranch?: boolean;
|
|
5
|
+
grantTeam?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Set up a single-branch changesets publish workflow in the current package repo.
|
|
9
|
+
*
|
|
10
|
+
* Installs:
|
|
11
|
+
* - .github/workflows/{ci,publish,changeset-check}.yml
|
|
12
|
+
* - .changeset/config.json + README.md
|
|
13
|
+
* - .changeset/initial-release.md
|
|
14
|
+
* - .gitignore entries for node_modules, lib, yarn.lock, src-compiled-artifacts
|
|
15
|
+
* - package.json: @changesets/cli + @changesets/changelog-github devDeps,
|
|
16
|
+
* publishConfig: {access: public}
|
|
17
|
+
* - package-lock.json generated via npm install --package-lock-only
|
|
18
|
+
*
|
|
19
|
+
* With --configure-github: if `gh` CLI is available and authenticated, also sets
|
|
20
|
+
* branch protection on main (strict + required "Build & Test" check).
|
|
21
|
+
*/
|
|
22
|
+
export declare function setupPublish(opts?: SetupPublishOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=setup-publish.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import TerserPlugin from 'terser-webpack-plugin';
|
|
2
|
+
import { LinkedConfig } from './interfaces.js';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a css class name to a unique scoped name (for CSS Modules)
|
|
5
|
+
* @param context
|
|
6
|
+
* @param currentFormat
|
|
7
|
+
* @param name
|
|
8
|
+
*/
|
|
9
|
+
declare function getLocalIdent(context: any, currentFormat: any, name: any): string;
|
|
10
|
+
export declare const getLinkedConfig: () => Promise<LinkedConfig>;
|
|
11
|
+
export declare const getWebpackAppConfig: () => Promise<{
|
|
12
|
+
mode: string;
|
|
13
|
+
devtool: string;
|
|
14
|
+
entry: string[];
|
|
15
|
+
watch: boolean;
|
|
16
|
+
output: {
|
|
17
|
+
path: string;
|
|
18
|
+
filename: string;
|
|
19
|
+
publicPath: string;
|
|
20
|
+
clean: boolean;
|
|
21
|
+
};
|
|
22
|
+
watchOptions: {
|
|
23
|
+
ignored: RegExp;
|
|
24
|
+
aggregateTimeout: number;
|
|
25
|
+
};
|
|
26
|
+
devServer: {
|
|
27
|
+
client: {
|
|
28
|
+
progress: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
plugins: any[];
|
|
32
|
+
externals: {
|
|
33
|
+
[npmModule: string]: string;
|
|
34
|
+
};
|
|
35
|
+
module: {
|
|
36
|
+
rules: ({
|
|
37
|
+
test: RegExp;
|
|
38
|
+
use: (string | {
|
|
39
|
+
loader: string;
|
|
40
|
+
options: {
|
|
41
|
+
url: boolean;
|
|
42
|
+
importLoaders: number;
|
|
43
|
+
modules: {
|
|
44
|
+
mode: string;
|
|
45
|
+
getLocalIdent: typeof getLocalIdent;
|
|
46
|
+
auto: (resourcePath: string) => boolean;
|
|
47
|
+
};
|
|
48
|
+
postcssOptions?: undefined;
|
|
49
|
+
};
|
|
50
|
+
} | {
|
|
51
|
+
loader: string;
|
|
52
|
+
options: {
|
|
53
|
+
postcssOptions: {
|
|
54
|
+
plugins: any[];
|
|
55
|
+
};
|
|
56
|
+
url?: undefined;
|
|
57
|
+
importLoaders?: undefined;
|
|
58
|
+
modules?: undefined;
|
|
59
|
+
};
|
|
60
|
+
})[];
|
|
61
|
+
exclude?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
test: RegExp;
|
|
64
|
+
use: {
|
|
65
|
+
loader: string;
|
|
66
|
+
options: {
|
|
67
|
+
transpileOnly: boolean;
|
|
68
|
+
getCustomTransformers?: () => {
|
|
69
|
+
before: import("typescript").TransformerFactory<import("typescript").SourceFile>[];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}[];
|
|
73
|
+
exclude: RegExp;
|
|
74
|
+
})[];
|
|
75
|
+
};
|
|
76
|
+
optimization: {
|
|
77
|
+
minimize: boolean;
|
|
78
|
+
minimizer: TerserPlugin<{
|
|
79
|
+
keep_classnames: boolean;
|
|
80
|
+
}>[];
|
|
81
|
+
splitChunks: {
|
|
82
|
+
cacheGroups: {
|
|
83
|
+
defaultVendors: boolean;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
stats: {
|
|
89
|
+
chunks: boolean;
|
|
90
|
+
assets: boolean;
|
|
91
|
+
entrypoints: boolean;
|
|
92
|
+
children: boolean;
|
|
93
|
+
modules: boolean;
|
|
94
|
+
};
|
|
95
|
+
resolve: {
|
|
96
|
+
extensions: string[];
|
|
97
|
+
alias: {
|
|
98
|
+
[oldNpmPath: string]: string;
|
|
99
|
+
};
|
|
100
|
+
extensionAlias: {
|
|
101
|
+
'.js': string[];
|
|
102
|
+
'.jsx': string[];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
cache: {
|
|
106
|
+
type: "filesystem";
|
|
107
|
+
} | {
|
|
108
|
+
type: "memory";
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=config-webpack-app.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AdjustedModuleConfig } from './interfaces';
|
|
2
|
+
import TerserPlugin from 'terser-webpack-plugin';
|
|
3
|
+
export declare function generateWebpackConfig(buildName: any, moduleName: any, config?: AdjustedModuleConfig): {
|
|
4
|
+
entry: any;
|
|
5
|
+
output: {
|
|
6
|
+
filename: string;
|
|
7
|
+
path: string;
|
|
8
|
+
devtoolModuleFilenameTemplate: string;
|
|
9
|
+
};
|
|
10
|
+
devtool: string;
|
|
11
|
+
mode: string;
|
|
12
|
+
resolve: {
|
|
13
|
+
extensions: string[];
|
|
14
|
+
alias: {
|
|
15
|
+
[oldNpmPath: string]: string;
|
|
16
|
+
};
|
|
17
|
+
fallback: {
|
|
18
|
+
crypto: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
resolveLoader: {
|
|
22
|
+
modules: string[];
|
|
23
|
+
};
|
|
24
|
+
optimization: {
|
|
25
|
+
minimize: boolean;
|
|
26
|
+
minimizer: TerserPlugin<import("terser").MinifyOptions>[];
|
|
27
|
+
};
|
|
28
|
+
watch: boolean;
|
|
29
|
+
watchOptions: {
|
|
30
|
+
ignored: string[];
|
|
31
|
+
aggregateTimeout: number;
|
|
32
|
+
};
|
|
33
|
+
module: {
|
|
34
|
+
rules: any[];
|
|
35
|
+
};
|
|
36
|
+
externals: ({ context, request, contextInfo }: {
|
|
37
|
+
context: any;
|
|
38
|
+
request: any;
|
|
39
|
+
contextInfo: any;
|
|
40
|
+
}, callback: any) => any;
|
|
41
|
+
plugins: any[];
|
|
42
|
+
stats: {
|
|
43
|
+
errorDetails: boolean;
|
|
44
|
+
chunks: boolean;
|
|
45
|
+
children: boolean;
|
|
46
|
+
version: boolean;
|
|
47
|
+
hash: boolean;
|
|
48
|
+
entrypoints: boolean;
|
|
49
|
+
modules: boolean;
|
|
50
|
+
};
|
|
51
|
+
cache: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=config-webpack.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LinkedConfig } from './interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Define a Linked configuration with type checking and autocomplete
|
|
4
|
+
* @param config The configuration object
|
|
5
|
+
* @returns The same configuration object (identity function for type inference)
|
|
6
|
+
*/
|
|
7
|
+
export declare function defineConfig(config: LinkedConfig): LinkedConfig;
|
|
8
|
+
//# sourceMappingURL=defineConfig.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as DeclarationPlugin } from './plugins/declaration-plugin';
|
|
2
|
+
export { default as externaliseModules } from './plugins/externalise-modules';
|
|
3
|
+
export { default as tailwindConfig } from './tailwind.config';
|
|
4
|
+
import { generateWebpackConfig } from './config-webpack';
|
|
5
|
+
export { generateWebpackConfig };
|
|
6
|
+
export * from './utils';
|
|
7
|
+
export { defineConfig } from './defineConfig';
|
|
8
|
+
export type { LinkedConfig, LinkedWebpackConfig, LinkedServerConfig, } from './interfaces';
|
|
9
|
+
export { buildPackageByPath } from './commands/build-package';
|
|
10
|
+
export { safeYarn } from './commands/safe-yarn';
|
|
11
|
+
export { setupPublish } from './commands/setup-publish';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export interface ModuleConfig {
|
|
2
|
+
internals?: string[] | '*';
|
|
3
|
+
entry?: string;
|
|
4
|
+
filename?: string;
|
|
5
|
+
declarations?: boolean;
|
|
6
|
+
internalsources?: string[];
|
|
7
|
+
externals?: {
|
|
8
|
+
[npmModule: string]: string;
|
|
9
|
+
};
|
|
10
|
+
target?: 'es5' | 'es6';
|
|
11
|
+
es5?: ModuleConfig;
|
|
12
|
+
es6?: ModuleConfig;
|
|
13
|
+
dev?: ModuleConfig;
|
|
14
|
+
prod?: ModuleConfig;
|
|
15
|
+
debug?: boolean;
|
|
16
|
+
alias?: {
|
|
17
|
+
[oldNpmPath: string]: string;
|
|
18
|
+
};
|
|
19
|
+
provide?: {};
|
|
20
|
+
environment?: 'nodejs' | 'browser' | 'polymorphic';
|
|
21
|
+
outputPath?: string;
|
|
22
|
+
bundlePath?: string;
|
|
23
|
+
es5Server?: boolean;
|
|
24
|
+
analyse?: boolean;
|
|
25
|
+
cssIdentName?: string;
|
|
26
|
+
beforeBuildCommand?: string;
|
|
27
|
+
afterBuildCommand?: string;
|
|
28
|
+
afterBuildCommandProduction?: string;
|
|
29
|
+
afterFirstBuildCommand?: string;
|
|
30
|
+
cssGlobalModulePaths?: string;
|
|
31
|
+
cssMode?: 'tailwind' | 'postcss';
|
|
32
|
+
cssFileName?: string;
|
|
33
|
+
tsConfigOverwrites?: Object;
|
|
34
|
+
}
|
|
35
|
+
export interface AdjustedModuleConfig extends ModuleConfig {
|
|
36
|
+
watch?: boolean;
|
|
37
|
+
productionMode?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface PackageDetails {
|
|
40
|
+
path: string;
|
|
41
|
+
packageName: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Webpack build configuration
|
|
45
|
+
*/
|
|
46
|
+
export interface LinkedWebpackConfig {
|
|
47
|
+
/**
|
|
48
|
+
* Enable webpack filesystem caching for faster rebuilds
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
cache?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Enable webpack bundle analyzer to visualize bundle size
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
analyse?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Additional webpack plugins
|
|
59
|
+
*/
|
|
60
|
+
plugins?: any[];
|
|
61
|
+
/**
|
|
62
|
+
* Webpack externals configuration - modules to exclude from bundle
|
|
63
|
+
*/
|
|
64
|
+
externals?: {
|
|
65
|
+
[npmModule: string]: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Webpack alias configuration for import path shortcuts
|
|
69
|
+
*/
|
|
70
|
+
alias?: {
|
|
71
|
+
[oldNpmPath: string]: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Patterns for CSS files that should not use CSS Modules
|
|
75
|
+
*/
|
|
76
|
+
cssGlobalModulePaths?: (RegExp | string)[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Server-specific configuration
|
|
80
|
+
*/
|
|
81
|
+
export interface LinkedServerConfig {
|
|
82
|
+
/**
|
|
83
|
+
* Paths to cache for server-side rendering (SSR)
|
|
84
|
+
* Cached pages will be served from memory for faster response times
|
|
85
|
+
*/
|
|
86
|
+
cachePaths?: string[];
|
|
87
|
+
/**
|
|
88
|
+
* Cache timeout in milliseconds for SSR rendered pages
|
|
89
|
+
* After this time, cached pages will be re-rendered
|
|
90
|
+
* @default 300000 (5 minutes)
|
|
91
|
+
*/
|
|
92
|
+
cacheTimeout?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Enable multi-core server processing (requires @semantu/multicore)
|
|
95
|
+
* Spawns worker processes to handle requests across multiple CPU cores
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
multiCore?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Function that loads the app component (for SSR and hot reloading)
|
|
101
|
+
* Must be a function to support hot module reloading
|
|
102
|
+
*/
|
|
103
|
+
loadAppComponent?: () => any;
|
|
104
|
+
/**
|
|
105
|
+
* Function that loads the app routes configuration (for SSR preloading)
|
|
106
|
+
* Must be a function to support hot module reloading
|
|
107
|
+
* Should return a RoutesModule from 'lincd-server'
|
|
108
|
+
*/
|
|
109
|
+
loadRoutes?: () => Promise<any>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Complete Linked configuration
|
|
113
|
+
*/
|
|
114
|
+
export interface LinkedConfig {
|
|
115
|
+
/**
|
|
116
|
+
* CSS processing mode (shared by webpack and server for SSR)
|
|
117
|
+
* - 'tailwind': Use Tailwind CSS v4 with @tailwindcss/postcss. Still supports CSS Modules for .module.css files
|
|
118
|
+
* - 'postcss': Use PostCSS with nesting support and CSS Modules for .module.css files
|
|
119
|
+
* @default 'postcss'
|
|
120
|
+
*/
|
|
121
|
+
cssMode?: 'tailwind' | 'postcss';
|
|
122
|
+
/**
|
|
123
|
+
* Webpack build configuration
|
|
124
|
+
*/
|
|
125
|
+
webpack?: LinkedWebpackConfig;
|
|
126
|
+
/**
|
|
127
|
+
* Server configuration
|
|
128
|
+
*/
|
|
129
|
+
server?: LinkedServerConfig;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=metadata.d.ts.map
|
package/lib/cjs/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default class DeclarationPlugin {
|
|
2
|
+
options: any;
|
|
3
|
+
moduleName: string;
|
|
4
|
+
excludedReferences: string[];
|
|
5
|
+
logMessages: boolean;
|
|
6
|
+
modulePackageInfo: any;
|
|
7
|
+
declarationFiles: any;
|
|
8
|
+
private exportRoot;
|
|
9
|
+
constructor(options?: any);
|
|
10
|
+
apply(compiler: any): void;
|
|
11
|
+
private debug;
|
|
12
|
+
private log;
|
|
13
|
+
private generateCombinedDeclaration;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=declaration-plugin.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ExecOptions } from 'child_process';
|
|
2
|
+
import { PackageDetails } from './interfaces.js';
|
|
3
|
+
export declare var getFileImports: (filePath: any) => Promise<string[]>;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param importPath The import path to check
|
|
7
|
+
* @param curFileDepth How many folders deep the current file is (0 = src, 1 = src/foo, etc.)
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare var isInvalidLINCDImport: (importPath: string, curFileDepth: number) => boolean;
|
|
11
|
+
export declare var isImportOutsideOfPackage: (importPath: string, curFileDepth: number) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param importPath The import path to check
|
|
15
|
+
* @param curFileDepth How many folders deep the current file is (0 = src, 1 = src/foo, etc.)
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare var isValidLINCDImport: (importPath: string, curFileDepth: number) => boolean;
|
|
19
|
+
export declare var isImportWithMissingExtension: (importPath: string) => boolean;
|
|
20
|
+
export declare var getPackageJSON: (root?: string, error?: boolean) => any;
|
|
21
|
+
/**
|
|
22
|
+
* Scans package.json for dependencies that are LINCD packages
|
|
23
|
+
* Also looks into dependencies of dependencies
|
|
24
|
+
* If no packageJson is given, it will attempt to obtain it from the current working directory
|
|
25
|
+
* Returns an array of lincd packages, with each entry containing an array with the package name and the local path to the package
|
|
26
|
+
* @param packageJson
|
|
27
|
+
*/
|
|
28
|
+
export declare var getLINCDDependencies: (packageJson?: any, checkedPackages?: Set<string>) => [string, string, string[]][];
|
|
29
|
+
export declare const getLastBuildTime: (packagePath: any) => {
|
|
30
|
+
lastModified: Date;
|
|
31
|
+
lastModifiedName: any;
|
|
32
|
+
lastModifiedTime: number;
|
|
33
|
+
};
|
|
34
|
+
export declare const getLastModifiedSourceTime: (packagePath: any) => {
|
|
35
|
+
lastModified: Date;
|
|
36
|
+
lastModifiedName: any;
|
|
37
|
+
lastModifiedTime: number;
|
|
38
|
+
};
|
|
39
|
+
export declare const getLastCommitTime: (packagePath: any) => Promise<{
|
|
40
|
+
date: Date;
|
|
41
|
+
changes: string;
|
|
42
|
+
commitId: string;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const getLastModifiedFile: (filePath: any, config?: {}) => {
|
|
45
|
+
lastModified: Date;
|
|
46
|
+
lastModifiedName: any;
|
|
47
|
+
lastModifiedTime: number;
|
|
48
|
+
};
|
|
49
|
+
export declare var getModulePackageJSON: (module_name: any, work_dir?: any) => any;
|
|
50
|
+
export declare function execp(cmd: any, log?: boolean, allowError?: boolean, options?: any): Promise<null>;
|
|
51
|
+
export declare function execPromise(command: any, log?: boolean, allowError?: boolean, options?: ExecOptions, pipeOutput?: boolean): Promise<string>;
|
|
52
|
+
export declare function generateScopedNameProduction(cssClassName: any, filepath: any, css?: any): string;
|
|
53
|
+
export declare function generateScopedName(cssClassName: any, filepath: any, css?: any): string;
|
|
54
|
+
export declare const needsRebuilding: (pkg: PackageDetails, useGitForLastModified: boolean, log?: boolean) => Promise<boolean>;
|
|
55
|
+
export declare function log(...messages: any[]): void;
|
|
56
|
+
export declare function debug(config: any, ...messages: any[]): void;
|
|
57
|
+
export declare function debugInfo(...messages: any[]): void;
|
|
58
|
+
export declare function warn(...messages: any[]): void;
|
|
59
|
+
export declare function flatten(arr: any): any;
|
|
60
|
+
export declare function getLinkedTailwindColors(): {
|
|
61
|
+
'primary-color': string;
|
|
62
|
+
'font-color': string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Recursively get all files in a directory
|
|
66
|
+
* https://stackoverflow.com/a/45130990/831465
|
|
67
|
+
* @param dir The directory to get files from
|
|
68
|
+
* @returns A promise that resolves to an array of file paths
|
|
69
|
+
*/
|
|
70
|
+
export declare function getFiles(dir: string, filenameFilter?: string): Promise<string[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Strip ANSI escape codes from a string
|
|
73
|
+
* @param str The string to strip ANSI codes from
|
|
74
|
+
* @returns The string with ANSI codes removed
|
|
75
|
+
*/
|
|
76
|
+
export declare function stripAnsi(str: string): string;
|
|
77
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PackageDetails } from './interfaces';
|
|
2
|
+
export declare const createApp: (name: any, basePath?: string, options?: {
|
|
3
|
+
appName?: string;
|
|
4
|
+
appPrefix?: string;
|
|
5
|
+
appDomain?: string;
|
|
6
|
+
skipInstall?: boolean;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare function warn(...messages: any[]): void;
|
|
9
|
+
export declare function logError(...errors: any[]): void;
|
|
10
|
+
export declare function developPackage(target: any, mode: any): void;
|
|
11
|
+
export declare function runOnPackagesGroupedByDependencies(lincdPackages: any, onBuildStack: (packageGroup: any, dependencies: any) => (pkg: PackageDetails) => Promise<any>, onStackEnd: any, sync?: boolean): Promise<void>;
|
|
12
|
+
export declare function buildAll(options: any): void;
|
|
13
|
+
export declare function getLincdPackages(rootPath?: string): PackageDetails[];
|
|
14
|
+
export declare const createOntology: (prefix: any, uriBase?: any, basePath?: string) => Promise<void>;
|
|
15
|
+
export declare const setNameVariables: (name: any) => {
|
|
16
|
+
hyphenName: any;
|
|
17
|
+
camelCaseName: any;
|
|
18
|
+
underscoreName: any;
|
|
19
|
+
plainName: any;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* get __dirname for either ESM/CJS
|
|
23
|
+
*/
|
|
24
|
+
export declare const getScriptDir: () => string;
|
|
25
|
+
export declare const createShape: (name: any, basePath?: string) => Promise<void>;
|
|
26
|
+
export declare const createSetComponent: (name: any, basePath?: string) => Promise<void>;
|
|
27
|
+
export declare const createComponent: (name: any, basePath?: string) => Promise<void>;
|
|
28
|
+
export declare const checkImports: (sourceFolder?: string, depth?: number, // Used to check if the import is outside the src folder
|
|
29
|
+
invalidImports?: Map<string, {
|
|
30
|
+
type: string;
|
|
31
|
+
importPath: string;
|
|
32
|
+
}[]>) => Promise<boolean>;
|
|
33
|
+
export declare const depCheckStaged: () => Promise<void>;
|
|
34
|
+
export declare const depCheck: (packagePath?: string) => Promise<unknown>;
|
|
35
|
+
export declare const ensureEnvironmentLoaded: () => Promise<void>;
|
|
36
|
+
export declare const runScript: (scriptName: string, options: {
|
|
37
|
+
spawn: boolean;
|
|
38
|
+
}) => Promise<never>;
|
|
39
|
+
export declare const runMethod: (packageName: string, method: string, options: {
|
|
40
|
+
spawn: boolean;
|
|
41
|
+
}) => Promise<void>;
|
|
42
|
+
export declare const startServer: (initOnly?: boolean, ServerClass?: any) => Promise<any>;
|
|
43
|
+
export declare const buildApp: () => Promise<never>;
|
|
44
|
+
export declare const buildFrontend: () => Promise<void>;
|
|
45
|
+
export declare const buildBackend: () => Promise<boolean>;
|
|
46
|
+
export declare const upgradePackages: () => Promise<void>;
|
|
47
|
+
export declare const createPackage: (name: any, uriBase?: any, basePath?: string) => Promise<void>;
|
|
48
|
+
export declare const register: (registryURL: any) => Promise<void>;
|
|
49
|
+
export declare const buildPackage: (target: any, target2: any, packagePath?: string, logResults?: boolean) => Promise<any>;
|
|
50
|
+
export declare const compilePackage: (packagePath?: string) => Promise<void>;
|
|
51
|
+
export declare const compilePackageESM: (packagePath?: string) => Promise<boolean>;
|
|
52
|
+
export declare const compilePackageCJS: (packagePath?: string) => Promise<boolean | {
|
|
53
|
+
error: any;
|
|
54
|
+
}>;
|
|
55
|
+
export declare var publishUpdated: (test?: boolean) => Promise<void>;
|
|
56
|
+
export declare var publishPackage: (pkg?: any, test?: any, info?: any, publishVersion?: any) => Promise<string>;
|
|
57
|
+
export declare var buildUpdated: (back: any, target: any, target2: any, useGitForLastModified?: boolean, test?: boolean) => Promise<void>;
|
|
58
|
+
export declare var executeCommandForEachPackage: (packages: any, command: any, filterMethod: any, filterValue: any) => Promise<boolean>;
|
|
59
|
+
export declare var addLinesToFile: (filePath: any, entries: any) => void;
|
|
60
|
+
export declare var addCapacitor: (basePath?: string) => Promise<void>;
|
|
61
|
+
export declare var executeCommandForPackage: (packageName: any, command: any) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Function to remove files older than 10 seconds from the 'lib' folder.
|
|
64
|
+
* @param {string} packagePath - The path to the package directory.
|
|
65
|
+
*/
|
|
66
|
+
export declare const removeOldFiles: (packagePath: any) => Promise<boolean>;
|
|
67
|
+
//# sourceMappingURL=cli-methods.d.ts.map
|
package/lib/esm/cli.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given any file or directory path, walk up to find the nearest package.json
|
|
3
|
+
* and run `linked build` in that package's directory. This is the editor-hook
|
|
4
|
+
* variant of build: the caller knows a file path, we figure out the package.
|
|
5
|
+
*
|
|
6
|
+
* Only rebuilds packages flagged `linkedPackage: true` (or legacy `lincd: true`).
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildPackageByPath(filePath: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=build-package.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run a yarn command at the workspace root while preserving nested repositories'
|
|
3
|
+
* yarn.lock files. Used when the workspace contains sibling repos (via mrgit)
|
|
4
|
+
* whose own lockfiles should not be clobbered by a root-level `yarn install`.
|
|
5
|
+
*
|
|
6
|
+
* Reads mrgit.json to determine which nested repos exist. If mrgit.json is
|
|
7
|
+
* missing, falls back to plain yarn behavior.
|
|
8
|
+
*/
|
|
9
|
+
export declare function safeYarn(args: string[]): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=safe-yarn.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SetupPublishOptions = {
|
|
2
|
+
configureGithub?: boolean;
|
|
3
|
+
scope?: 'core' | 'community';
|
|
4
|
+
dualBranch?: boolean;
|
|
5
|
+
grantTeam?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Set up a single-branch changesets publish workflow in the current package repo.
|
|
9
|
+
*
|
|
10
|
+
* Installs:
|
|
11
|
+
* - .github/workflows/{ci,publish,changeset-check}.yml
|
|
12
|
+
* - .changeset/config.json + README.md
|
|
13
|
+
* - .changeset/initial-release.md
|
|
14
|
+
* - .gitignore entries for node_modules, lib, yarn.lock, src-compiled-artifacts
|
|
15
|
+
* - package.json: @changesets/cli + @changesets/changelog-github devDeps,
|
|
16
|
+
* publishConfig: {access: public}
|
|
17
|
+
* - package-lock.json generated via npm install --package-lock-only
|
|
18
|
+
*
|
|
19
|
+
* With --configure-github: if `gh` CLI is available and authenticated, also sets
|
|
20
|
+
* branch protection on main (strict + required "Build & Test" check).
|
|
21
|
+
*/
|
|
22
|
+
export declare function setupPublish(opts?: SetupPublishOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=setup-publish.d.ts.map
|