@bagelink/workspace 1.10.2 → 1.10.4

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/bin/bgl.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  const process = require('node:process');
5
- const detect = require('../shared/workspace.BT61Ods7.cjs');
5
+ const detect = require('../shared/workspace.BMua7RCN.cjs');
6
6
  require('node:fs');
7
7
  require('node:path');
8
8
  require('prompts');
package/dist/bin/bgl.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import process from 'node:process';
3
- import { i as initWorkspace, g as generateWorkspaceConfig, h as addProject, l as listProjects, k as isWorkspace, d as setupLint, f as generateSDKForWorkspace, e as generateSDK } from '../shared/workspace.B9BC0YWd.mjs';
3
+ import { i as initWorkspace, g as generateWorkspaceConfig, h as addProject, l as listProjects, k as isWorkspace, d as setupLint, f as generateSDKForWorkspace, e as generateSDK } from '../shared/workspace.wLxjK4CD.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import 'prompts';
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const node_fs = require('node:fs');
4
4
  const node_path = require('node:path');
5
5
  const process = require('node:process');
6
- const detect = require('./shared/workspace.BT61Ods7.cjs');
6
+ const detect = require('./shared/workspace.BMua7RCN.cjs');
7
7
  require('prompts');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
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.B9BC0YWd.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.B9BC0YWd.mjs';
4
+ import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.wLxjK4CD.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.wLxjK4CD.mjs';
6
6
  import 'prompts';
7
7
 
8
8
  async function resolveConfig(mode = "development", options = {}) {
@@ -376,7 +376,7 @@ function updatePackageJsonLint(root, configs) {
376
376
  }
377
377
  try {
378
378
  const packageJson = JSON.parse(
379
- require("fs").readFileSync(packageJsonPath, "utf-8")
379
+ node_fs.readFileSync(packageJsonPath, "utf-8")
380
380
  );
381
381
  if (!packageJson.scripts) {
382
382
  packageJson.scripts = {};
@@ -831,7 +831,7 @@ function updateWorkspaceScripts(root, projectName) {
831
831
  if (!node_fs.existsSync(packageJsonPath)) return;
832
832
  try {
833
833
  const packageJson = JSON.parse(
834
- require("fs").readFileSync(packageJsonPath, "utf-8")
834
+ readFileSync(packageJsonPath, "utf-8")
835
835
  );
836
836
  if (!packageJson.scripts) {
837
837
  packageJson.scripts = {};
@@ -1,4 +1,4 @@
1
- import { writeFileSync, existsSync, readFileSync, mkdirSync, readdirSync } from 'node:fs';
1
+ import { writeFileSync, existsSync, readFileSync as readFileSync$1, mkdirSync, readdirSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
3
  import process from 'node:process';
4
4
  import prompts from 'prompts';
@@ -164,7 +164,7 @@ function updatePackageJsonScripts(root) {
164
164
  return;
165
165
  }
166
166
  try {
167
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
167
+ const packageJson = JSON.parse(readFileSync$1(packageJsonPath, "utf-8"));
168
168
  if (!packageJson.scripts) {
169
169
  packageJson.scripts = {};
170
170
  }
@@ -203,7 +203,7 @@ function updateViteConfig(root) {
203
203
  const viteConfigPath = resolve(root, "vite.config.ts");
204
204
  const viteConfigExists = existsSync(viteConfigPath);
205
205
  if (viteConfigExists) {
206
- const existingConfig = readFileSync(viteConfigPath, "utf-8");
206
+ const existingConfig = readFileSync$1(viteConfigPath, "utf-8");
207
207
  if (existingConfig.includes("@bagelink/workspace")) {
208
208
  console.log("\u2139\uFE0F vite.config.ts already configured");
209
209
  return;
@@ -369,7 +369,7 @@ function updatePackageJsonLint(root, configs) {
369
369
  }
370
370
  try {
371
371
  const packageJson = JSON.parse(
372
- require("fs").readFileSync(packageJsonPath, "utf-8")
372
+ readFileSync$1(packageJsonPath, "utf-8")
373
373
  );
374
374
  if (!packageJson.scripts) {
375
375
  packageJson.scripts = {};
@@ -824,7 +824,7 @@ function updateWorkspaceScripts(root, projectName) {
824
824
  if (!existsSync(packageJsonPath)) return;
825
825
  try {
826
826
  const packageJson = JSON.parse(
827
- require("fs").readFileSync(packageJsonPath, "utf-8")
827
+ readFileSync(packageJsonPath, "utf-8")
828
828
  );
829
829
  if (!packageJson.scripts) {
830
830
  packageJson.scripts = {};
@@ -856,7 +856,7 @@ function isWorkspace(root = process.cwd()) {
856
856
  const packageJsonPath = resolve(root, "package.json");
857
857
  if (existsSync(packageJsonPath)) {
858
858
  try {
859
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
859
+ const packageJson = JSON.parse(readFileSync$1(packageJsonPath, "utf-8"));
860
860
  if (packageJson.workspaces !== void 0) {
861
861
  return true;
862
862
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/workspace",
3
3
  "type": "module",
4
- "version": "1.10.2",
4
+ "version": "1.10.4",
5
5
  "description": "Monorepo workspace tooling for Bagel projects with proxy and config management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
package/src/lint.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { existsSync, writeFileSync } from 'node:fs'
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs'
2
2
  import { resolve } from 'node:path'
3
3
  import process from 'node:process'
4
4
  import prompts from 'prompts'
@@ -195,7 +195,7 @@ function updatePackageJsonLint(root: string, configs: string[]): void {
195
195
 
196
196
  try {
197
197
  const packageJson = JSON.parse(
198
- require('fs').readFileSync(packageJsonPath, 'utf-8'),
198
+ readFileSync(packageJsonPath, 'utf-8'),
199
199
  )
200
200
 
201
201
  if (!packageJson.scripts) {
package/src/workspace.ts CHANGED
@@ -386,7 +386,7 @@ function updateWorkspaceScripts(root: string, projectName: string): void {
386
386
 
387
387
  try {
388
388
  const packageJson = JSON.parse(
389
- require('fs').readFileSync(packageJsonPath, 'utf-8'),
389
+ readFileSync(packageJsonPath, 'utf-8'),
390
390
  )
391
391
 
392
392
  if (!packageJson.scripts) {