Skip to content

Commit 498de4b

Browse files
committed
chore: wip
1 parent 165b83e commit 498de4b

File tree

13 files changed

+83
-55
lines changed

13 files changed

+83
-55
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
import { alias } from '@stacksjs/alias'
12
import { defineBuildConfig } from '@stacksjs/development'
23

34
export default defineBuildConfig({
5+
alias,
46
entries: [
5-
{
6-
builder: 'mkdist',
7-
input: './src/',
8-
outDir: './dist/',
9-
},
7+
'./src/index',
108
],
11-
129
declaration: true,
10+
clean: true,
11+
rollup: {
12+
inlineDependencies: true,
13+
},
1314
})

.stacks/core/error-handling/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@
4040
"typecheck": "tsc --noEmit"
4141
},
4242
"peerDependencies": {
43-
"@ow3/eslint-config": "^0.37.2",
44-
"neverthrow": "^6.0.0"
43+
"@ow3/eslint-config": "^0.37.2"
4544
},
4645
"devDependencies": {
4746
"@stacksjs/development": "workspace:*"
47+
},
48+
"dependencies": {
49+
"neverthrow": "^6.0.0"
4850
}
4951
}

.stacks/core/logging/build.config.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
import { alias } from '@stacksjs/alias'
12
import { defineBuildConfig } from '@stacksjs/development'
23

34
export default defineBuildConfig({
5+
alias,
46
entries: [
5-
{
6-
builder: 'mkdist',
7-
input: './src/',
8-
outDir: './dist/',
9-
},
7+
'./src/index',
108
],
11-
129
declaration: true,
10+
clean: true,
11+
externals: ['vue-ray', 'node-ray'],
12+
rollup: {
13+
inlineDependencies: true,
14+
},
1315
})

.stacks/core/logging/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,14 @@
4141
},
4242
"peerDependencies": {
4343
"consola": "^2.15.3",
44+
"node-ray": "^1.19.4",
4445
"vue-ray": "^1.17.3"
4546
},
4647
"devDependencies": {
4748
"@stacksjs/development": "workspace:*"
49+
},
50+
"dependencies": {
51+
"node-ray": "^1.19.4",
52+
"vue-ray": "^1.17.3"
4853
}
4954
}

.stacks/core/payments/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@
4040
"typecheck": "tsc --noEmit"
4141
},
4242
"dependencies": {
43+
"@stacksjs/utils": "workspace:*",
4344
"@stripe/stripe-js": "^1.52.0",
4445
"stripe": "^11.17.0"
4546
},
4647
"devDependencies": {
47-
"@stacksjs/development": "workspace:*"
48+
"@stacksjs/config": "workspace:*",
49+
"@stacksjs/development": "workspace:*",
50+
"@stacksjs/types": "workspace:*"
4851
}
4952
}

.stacks/core/payments/src/drivers/stripe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ChargeOptions, CustomerOptions, DisputeOptions, EventOptions } from '@stacksjs/types'
22
import { isString } from '@stacksjs/utils'
33
import Stripe from 'stripe'
4-
import services from '../../../../../config/services'
4+
import { services } from '@stacksjs/config'
55

66
const apiKey = services?.stripe?.apiKey
77

.stacks/core/push/src/drivers/expo.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
import { Novu } from '@novu/node'
2-
import { notification } from '@stacksjs/config'
3-
import type { ExpoPushNotificationOptions } from '@stacksjs/types'
4-
import { ResultAsync } from '@stacksjs/error-handling'
5-
import { italic } from '@stacksjs/cli'
1+
// import { Novu } from '@novu/node'
2+
// import { notification } from '@stacksjs/config'
3+
// import type { ExpoPushNotificationOptions } from '@stacksjs/types'
4+
// import { ResultAsync } from '@stacksjs/error-handling'
5+
// import { italic } from '@stacksjs/cli'
66

7-
const novu = new Novu(notification.novu.key)
7+
// const novu = new Novu(notification.novu.key)
88

9-
function send(options: ExpoPushNotificationOptions) {
10-
return ResultAsync.fromPromise(
11-
novu.trigger(options.eventName, {
12-
to: options.to,
13-
payload: options.payload,
14-
}),
15-
() => new Error(`Failed to send message using provider: ${italic('Expo')}`),
16-
)
17-
}
9+
// function send(options: ExpoPushNotificationOptions) {
10+
// return ResultAsync.fromPromise(
11+
// novu.trigger(options.eventName, {
12+
// to: options.to,
13+
// payload: options.payload,
14+
// }),
15+
// () => new Error(`Failed to send message using provider: ${italic('Expo')}`),
16+
// )
17+
// }
1818

19-
export { send as Send, send }
19+
// export { send as Send, send }
20+
21+
export {}

.stacks/core/push/src/drivers/fcm.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
import { Novu } from '@novu/node'
2-
import { notification } from '@stacksjs/config'
3-
import type { FCMPushNotificationOptions } from '@stacksjs/types'
4-
import { ResultAsync } from '@stacksjs/error-handling'
5-
import { italic } from '@stacksjs/cli'
1+
// import { Novu } from '@novu/node'
2+
// import { notification } from '@stacksjs/config'
3+
// import type { FCMPushNotificationOptions } from '@stacksjs/types'
4+
// import { ResultAsync } from '@stacksjs/error-handling'
5+
// import { italic } from '@stacksjs/cli'
66

7-
const novu = new Novu(notification.novu.key)
7+
// const novu = new Novu(notification.novu.key)
88

9-
function send(options: FCMPushNotificationOptions) {
10-
return ResultAsync.fromPromise(
11-
novu.trigger(options.eventName, {
12-
to: options.to,
13-
payload: options.payload,
14-
}),
15-
() => new Error(`Failed to send message using provider: ${italic('FCM')}`),
16-
)
17-
}
9+
// function send(options: FCMPushNotificationOptions) {
10+
// return ResultAsync.fromPromise(
11+
// novu.trigger(options.eventName, {
12+
// to: options.to,
13+
// payload: options.payload,
14+
// }),
15+
// () => new Error(`Failed to send message using provider: ${italic('FCM')}`),
16+
// )
17+
// }
1818

19-
export { send as Send, send }
19+
// export { send as Send, send }
20+
21+
export {}

.stacks/core/utils/src/helpers.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import type { CliOptions, Manifest, NpmScript } from '@stacksjs/types'
1+
import type { CliOptions, CommandResult, Manifest, NpmScript, Result } from '@stacksjs/types'
22
import detectIndent from 'detect-indent'
33
import { frameworkPath, projectPath } from '@stacksjs/path'
4-
import semver from 'semver'
54
import { parse } from 'yaml'
65
import { log, runCommand, spawn } from '@stacksjs/cli'
76
import storage from '@stacksjs/storage'
@@ -95,7 +94,7 @@ export async function setEnvValue(key: string, value: string) {
9594
/**
9695
* Runs the specified NPM script in the package.json file.
9796
*/
98-
export async function runNpmScript(script: NpmScript, options?: CliOptions) {
97+
export async function runNpmScript(script: NpmScript, options?: CliOptions): Promise<Result<CommandResult<string>, Error>> {
9998
const { data: manifest } = await storage.readJsonFile('package.json', frameworkPath())
10099

101100
if (isManifest(manifest) && hasScript(manifest, script)) // simple, yet effective check to see if the script exists
@@ -140,8 +139,7 @@ export function env(key: string, fallback?: any) {
140139
return key ?? fallback
141140
}
142141

143-
export { semver }
144-
export * from '@dinero.js/currencies'
142+
// export { SemVer } from 'semver'
145143
export * from 'dinero.js'
146144
export { detectIndent }
147145
export { detectNewline } from 'detect-newline'

.stacks/core/utils/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export * from './guards'
88
export { isDef, isBoolean, isFunction, isNumber, isString, isObject, isWindow, isBrowser, isServer, isMap, isSet, isPromise } from './is'
99
export * from './p'
1010
export * from './vendor'
11+
export * as semver from 'semver'
1112

1213
export * from '@vueuse/core'
1314
export * from '@vueuse/math'

0 commit comments

Comments
 (0)