@bagelink/workspace 1.7.4 → 1.7.8
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/README.md +224 -1
- package/bin/bgl.ts +102 -4
- package/dist/bin/bgl.cjs +80 -5
- package/dist/bin/bgl.mjs +80 -5
- package/dist/index.cjs +18 -10
- package/dist/index.d.cts +41 -1
- package/dist/index.d.mts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/workspace.BMTTo3s8.cjs +993 -0
- package/dist/shared/workspace.COhZ__uF.mjs +973 -0
- package/package.json +15 -4
- package/src/detect.ts +90 -0
- package/src/index.ts +5 -0
- package/src/lint.ts +235 -0
- package/src/sdk.ts +175 -0
- package/src/workspace.ts +505 -0
- package/templates/dev-runner.ts +61 -0
- package/dist/shared/workspace.R3ocIOTb.mjs +0 -234
- package/dist/shared/workspace.hk0HFYa9.cjs +0 -246
package/dist/index.d.mts
CHANGED
|
@@ -91,6 +91,46 @@ declare function createCustomProxy(paths: string[], target: string, options?: {
|
|
|
91
91
|
secure?: boolean;
|
|
92
92
|
}): ProxyConfig;
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Set up linting in a project
|
|
96
|
+
*/
|
|
97
|
+
declare function setupLint(root?: string, isWorkspace?: boolean): Promise<void>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Generate SDK from OpenAPI spec
|
|
101
|
+
*/
|
|
102
|
+
declare function generateSDK(root?: string): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Generate SDK for all projects in workspace
|
|
105
|
+
*/
|
|
106
|
+
declare function generateSDKForWorkspace(root?: string): Promise<void>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Initialize a new workspace with flat structure
|
|
110
|
+
*/
|
|
111
|
+
declare function initWorkspace(root?: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Add a new project to the workspace
|
|
114
|
+
*/
|
|
115
|
+
declare function addProject(name: string, root?: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* List all projects in workspace
|
|
118
|
+
*/
|
|
119
|
+
declare function listProjects(root?: string): string[];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Detect if current directory is a workspace root
|
|
123
|
+
*/
|
|
124
|
+
declare function isWorkspace(root?: string): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Get workspace info
|
|
127
|
+
*/
|
|
128
|
+
declare function getWorkspaceInfo(root?: string): {
|
|
129
|
+
isWorkspace: boolean;
|
|
130
|
+
projects: string[];
|
|
131
|
+
hasShared: boolean;
|
|
132
|
+
};
|
|
133
|
+
|
|
94
134
|
/**
|
|
95
135
|
* Define workspace configuration
|
|
96
136
|
* Simple helper to get config from a config map
|
|
@@ -123,5 +163,5 @@ declare function createWorkspace(options?: WorkspaceOptions): {
|
|
|
123
163
|
clearCache(): void;
|
|
124
164
|
};
|
|
125
165
|
|
|
126
|
-
export { createCustomProxy, createViteProxy, createWorkspace, defineWorkspace, generateNetlifyConfig, generateNetlifyRedirect, generateWorkspaceConfig, generateWorkspaceConfigSync, mergeConfigs, resolveConfig, setBuildEnvVars, writeNetlifyConfig };
|
|
166
|
+
export { addProject, createCustomProxy, createViteProxy, createWorkspace, defineWorkspace, generateNetlifyConfig, generateNetlifyRedirect, generateSDK, generateSDKForWorkspace, generateWorkspaceConfig, generateWorkspaceConfigSync, getWorkspaceInfo, initWorkspace, isWorkspace, listProjects, mergeConfigs, resolveConfig, setBuildEnvVars, setupLint, writeNetlifyConfig };
|
|
127
167
|
export type { ProxyConfig, WorkspaceConfig, WorkspaceEnvironment, WorkspaceOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,46 @@ declare function createCustomProxy(paths: string[], target: string, options?: {
|
|
|
91
91
|
secure?: boolean;
|
|
92
92
|
}): ProxyConfig;
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Set up linting in a project
|
|
96
|
+
*/
|
|
97
|
+
declare function setupLint(root?: string, isWorkspace?: boolean): Promise<void>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Generate SDK from OpenAPI spec
|
|
101
|
+
*/
|
|
102
|
+
declare function generateSDK(root?: string): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Generate SDK for all projects in workspace
|
|
105
|
+
*/
|
|
106
|
+
declare function generateSDKForWorkspace(root?: string): Promise<void>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Initialize a new workspace with flat structure
|
|
110
|
+
*/
|
|
111
|
+
declare function initWorkspace(root?: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Add a new project to the workspace
|
|
114
|
+
*/
|
|
115
|
+
declare function addProject(name: string, root?: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* List all projects in workspace
|
|
118
|
+
*/
|
|
119
|
+
declare function listProjects(root?: string): string[];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Detect if current directory is a workspace root
|
|
123
|
+
*/
|
|
124
|
+
declare function isWorkspace(root?: string): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Get workspace info
|
|
127
|
+
*/
|
|
128
|
+
declare function getWorkspaceInfo(root?: string): {
|
|
129
|
+
isWorkspace: boolean;
|
|
130
|
+
projects: string[];
|
|
131
|
+
hasShared: boolean;
|
|
132
|
+
};
|
|
133
|
+
|
|
94
134
|
/**
|
|
95
135
|
* Define workspace configuration
|
|
96
136
|
* Simple helper to get config from a config map
|
|
@@ -123,5 +163,5 @@ declare function createWorkspace(options?: WorkspaceOptions): {
|
|
|
123
163
|
clearCache(): void;
|
|
124
164
|
};
|
|
125
165
|
|
|
126
|
-
export { createCustomProxy, createViteProxy, createWorkspace, defineWorkspace, generateNetlifyConfig, generateNetlifyRedirect, generateWorkspaceConfig, generateWorkspaceConfigSync, mergeConfigs, resolveConfig, setBuildEnvVars, writeNetlifyConfig };
|
|
166
|
+
export { addProject, createCustomProxy, createViteProxy, createWorkspace, defineWorkspace, generateNetlifyConfig, generateNetlifyRedirect, generateSDK, generateSDKForWorkspace, generateWorkspaceConfig, generateWorkspaceConfigSync, getWorkspaceInfo, initWorkspace, isWorkspace, listProjects, mergeConfigs, resolveConfig, setBuildEnvVars, setupLint, writeNetlifyConfig };
|
|
127
167
|
export type { ProxyConfig, WorkspaceConfig, WorkspaceEnvironment, WorkspaceOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { resolve, join } from 'node:path';
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.
|
|
5
|
-
export { a as generateNetlifyConfig, b as generateNetlifyRedirect, c as generateWorkspaceConfigSync } from './shared/workspace.
|
|
4
|
+
import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.COhZ__uF.mjs';
|
|
5
|
+
export { h as addProject, a as generateNetlifyConfig, b as generateNetlifyRedirect, e as generateSDK, f as generateSDKForWorkspace, c as generateWorkspaceConfigSync, j as getWorkspaceInfo, i as initWorkspace, k as isWorkspace, l as listProjects, d as setupLint } from './shared/workspace.COhZ__uF.mjs';
|
|
6
6
|
import 'prompts';
|
|
7
7
|
|
|
8
8
|
async function resolveConfig(mode = "development", options = {}) {
|