Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pin-workspace-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

---

Pin the root devDependency on `@effect-app/cli` to the workspace package, and run that package from TypeScript source so the monorepo does not have to compile it first.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"packageManager": "pnpm@11.18.0",
"engines": {
"node": ">=24",
"pnpm": ">= 11.0.0"
},
"scripts": {
Expand Down Expand Up @@ -32,7 +33,7 @@
"build:tsc": "pnpm check && node scripts/rewrite-dist-declaration-imports.mjs",
"check": "tsgo --build ./tsconfig.all.json",
"watch": "pnpm build:tsc --watch",
"build": "cd packages/eslint-shared-config && pnpm build && cd ../.. && cd packages/cli && pnpm build && cd .. && pnpm build:tsc && cd vue-components && pnpm build",
"build": "cd packages/eslint-shared-config && pnpm build && cd ../.. && pnpm build:tsc && cd packages/vue-components && pnpm build",
"rbuild": "pnpm clean && pnpm build",
"nnm": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && pnpm i",
"prepare": "node -e \"const v=require('typescript/package.json').version;if(v.startsWith('6.')){require('child_process').execSync('effect-language-service patch',{stdio:'inherit'})}else{console.log('Skipping effect-language-service patch for TypeScript '+v)}\" && effect-tsgo patch --no-typescript --oxlint && node scripts/install-git-hooks.mjs",
Expand All @@ -45,7 +46,7 @@
},
"devDependencies": {
"@changesets/cli": "^2.31.0",
"@effect-app/cli": "2.1.0-beta.35",
"@effect-app/cli": "workspace:*",
"@effect-app/eslint-codegen-model": "workspace:*",
"@effect-app/infra": "workspace:*",
"@effect/language-service": "0.87.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/bin.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
import "@effect-app/cli"
import "./src/index.ts"
90 changes: 70 additions & 20 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,46 @@
"typesVersions": {
"*": {
"*": [
"dist/*"
"src/*"
]
}
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./argv-patch": {
"types": "./dist/argv-patch.d.ts",
"default": "./dist/argv-patch.js"
"types": "./src/argv-patch.ts",
"default": "./src/argv-patch.ts"
},
"./extract": {
"types": "./dist/extract.d.ts",
"default": "./dist/extract.js"
"types": "./src/extract.ts",
"default": "./src/extract.ts"
},
"./gist": {
"types": "./dist/gist.d.ts",
"default": "./dist/gist.js"
"types": "./src/gist.ts",
"default": "./src/gist.ts"
},
"./os-command": {
"types": "./dist/os-command.d.ts",
"default": "./dist/os-command.js"
"types": "./src/os-command.ts",
"default": "./src/os-command.ts"
},
"./shared": {
"types": "./dist/shared.d.ts",
"default": "./dist/shared.js"
"types": "./src/shared.ts",
"default": "./src/shared.ts"
},
"./sync-effect-subtree": {
"types": "./dist/sync-effect-subtree.d.ts",
"default": "./dist/sync-effect-subtree.js"
"types": "./src/sync-effect-subtree.ts",
"default": "./src/sync-effect-subtree.ts"
},
"./sync-effect-app-subtree": {
"types": "./dist/sync-effect-app-subtree.d.ts",
"default": "./dist/sync-effect-app-subtree.js"
"types": "./src/sync-effect-app-subtree.ts",
"default": "./src/sync-effect-app-subtree.ts"
},
"./sync-shared": {
"types": "./dist/sync-shared.d.ts",
"default": "./dist/sync-shared.js"
"types": "./src/sync-shared.ts",
"default": "./src/sync-shared.ts"
}
},
"scripts": {
Expand Down Expand Up @@ -103,6 +103,56 @@
],
"publishConfig": {
"directory": ".publish",
"linkDirectory": false
"linkDirectory": false,
"bin": {
"effect-app": "./dist/index.js",
"effa": "./dist/index.js",
"effect-app-cli": "./dist/index.js"
},
"typesVersions": {
"*": {
"*": [
"dist/*"
]
}
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./argv-patch": {
"types": "./dist/argv-patch.d.ts",
"default": "./dist/argv-patch.js"
},
"./extract": {
"types": "./dist/extract.d.ts",
"default": "./dist/extract.js"
},
"./gist": {
"types": "./dist/gist.d.ts",
"default": "./dist/gist.js"
},
"./os-command": {
"types": "./dist/os-command.d.ts",
"default": "./dist/os-command.js"
},
"./shared": {
"types": "./dist/shared.d.ts",
"default": "./dist/shared.js"
},
"./sync-effect-subtree": {
"types": "./dist/sync-effect-subtree.d.ts",
"default": "./dist/sync-effect-subtree.js"
},
"./sync-effect-app-subtree": {
"types": "./dist/sync-effect-app-subtree.d.ts",
"default": "./dist/sync-effect-app-subtree.js"
},
"./sync-shared": {
"types": "./dist/sync-shared.d.ts",
"default": "./dist/sync-shared.js"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/gist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as SynchronizedRef from "effect/SynchronizedRef"

import * as yaml from "js-yaml"
import path from "path"
import { RunCommandService } from "./os-command.js"
import { RunCommandService } from "./os-command.ts"

export class GistError extends Data.TaggedError("GistError")<{ message: string }> {}

Expand Down
21 changes: 11 additions & 10 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
/* eslint-disable no-constant-binary-expression */
/* eslint-disable no-empty-pattern */
// import necessary modules from the libraries
Expand All @@ -10,16 +11,16 @@ import * as Layer from "effect/Layer"
import * as Option from "effect/Option"
import * as Path from "effect/Path"
import * as Stream from "effect/Stream"
import { ExtractExportMappingsService } from "./extract.js"
import { GistHandler } from "./gist.js"
import { RunCommandService } from "./os-command.js"
import { packages } from "./shared.js"

import { patchArgvForWrapCommands } from "./argv-patch.js"
import { syncEffectAppSubtree } from "./sync-effect-app-subtree.js"
import { syncEffectSubtree } from "./sync-effect-subtree.js"
import { syncDiff, syncPush, syncShared } from "./sync-shared.js"
import { makeNcuUpdateCommand } from "./update-packages.js"
import { ExtractExportMappingsService } from "./extract.ts"
import { GistHandler } from "./gist.ts"
import { RunCommandService } from "./os-command.ts"
import { packages } from "./shared.ts"

import { patchArgvForWrapCommands } from "./argv-patch.ts"
import { syncEffectAppSubtree } from "./sync-effect-app-subtree.ts"
import { syncEffectSubtree } from "./sync-effect-subtree.ts"
import { syncDiff, syncPush, syncShared } from "./sync-shared.ts"
import { makeNcuUpdateCommand } from "./update-packages.ts"

patchArgvForWrapCommands(process.argv)

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/sync-effect-app-subtree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Effect from "effect/Effect"
import * as FileSystem from "effect/FileSystem"
import * as Option from "effect/Option"
import * as Path from "node:path"
import { RunCommandService } from "./os-command.js"
import { RunCommandService } from "./os-command.ts"

export interface SyncEffectAppConfig {
readonly manifestPaths: ReadonlyArray<string>
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/sync-effect-subtree.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Effect from "effect/Effect"
import * as FileSystem from "effect/FileSystem"
import * as Option from "effect/Option"
import { RunCommandService } from "./os-command.js"
import { RunCommandService } from "./os-command.ts"

export interface SyncEffectConfig {
readonly manifestPaths: ReadonlyArray<string>
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/sync-shared.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Effect from "effect/Effect"
import * as FileSystem from "effect/FileSystem"
import * as Path from "effect/Path"
import { RunCommandService } from "./os-command.js"
import { RunCommandService } from "./os-command.ts"

/**
* Project-side lockfile shape (`.shared.json`).
Expand Down
1 change: 1 addition & 0 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"moduleResolution": "Node16",
"outDir": "./dist",
"rootDir": "./src",
"verbatimModuleSyntax": true,
"tsBuildInfoFile": "./dist/.tsbuildinfo"
},
"include": [
Expand Down
Loading
Loading