@sqrzro/addons 4.0.0-alpha.5 → 4.0.0-alpha.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.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class MissingConfigError extends Error {
|
|
2
2
|
constructor(name) {
|
|
3
|
-
super(
|
|
3
|
+
super(
|
|
4
|
+
`The config for addon \`${name}\` appears to be missing. Please make sure you have set it up using \`registerAddons\` in your root layout or API route.`
|
|
5
|
+
);
|
|
4
6
|
this.name = 'MissingConfigError';
|
|
5
7
|
}
|
|
6
8
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export * from './interfaces';
|
|
2
|
-
export { default as MissingConfigError } from './config/MissingConfigError';
|
|
3
2
|
export { default as extendRepository } from './extend-repository';
|
|
4
3
|
export { default as extendProxy } from './extend-proxy';
|
|
5
|
-
export { default as registerAddons } from './register-addons';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export * from './interfaces';
|
|
2
|
-
export { default as MissingConfigError } from './config/MissingConfigError';
|
|
3
2
|
export { default as extendRepository } from './extend-repository';
|
|
4
3
|
export { default as extendProxy } from './extend-proxy';
|
|
5
|
-
export { default as registerAddons } from './register-addons';
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { AppConfig } from '@sqrzro/config';
|
|
2
|
-
import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
3
1
|
export interface AddonProxyResponse {
|
|
4
2
|
data: object;
|
|
5
3
|
redirect?: string | null;
|
|
6
4
|
}
|
|
7
|
-
export type AddonRegisterReturn = {
|
|
8
|
-
register: (db: NodePgDatabase, appConfig: AppConfig) => void;
|
|
9
|
-
schema?: string;
|
|
10
|
-
};
|
|
11
|
-
export type AddonRegisterFunction<T = object> = (config?: T) => AddonRegisterReturn;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AppConfig } from '@sqrzro/config';
|
|
2
1
|
import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
3
2
|
import type { AddonRegisterReturn } from './interfaces';
|
|
4
|
-
declare function registerAddons(db: NodePgDatabase,
|
|
3
|
+
declare function registerAddons(db: NodePgDatabase, addons: AddonRegisterReturn[]): void;
|
|
5
4
|
export default registerAddons;
|
package/dist/register-addons.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/addons",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.8",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "ISC",
|
|
@@ -23,18 +23,17 @@
|
|
|
23
23
|
"dist/**/*"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"
|
|
27
|
-
"next": "^16.1.6",
|
|
28
|
-
"@sqrzro/config": "^4.0.0-alpha.3"
|
|
26
|
+
"next": "^16.1.6"
|
|
29
27
|
},
|
|
30
28
|
"devDependencies": {
|
|
31
29
|
"prettier": "^3.8.1",
|
|
32
30
|
"typescript": "^5.9.3",
|
|
33
|
-
"@sqrzro/prettier-config": "^4.0.0-alpha.
|
|
31
|
+
"@sqrzro/prettier-config": "^4.0.0-alpha.5"
|
|
34
32
|
},
|
|
35
33
|
"scripts": {
|
|
36
34
|
"build": "tsc",
|
|
37
35
|
"clean": "rimraf ./dist",
|
|
38
|
-
"dev": "tsc --watch"
|
|
36
|
+
"dev": "tsc --watch",
|
|
37
|
+
"prettier": "prettier --write \"**/*.(cjs|cts|js|jsx|mjs|mts|ts|tsx)\""
|
|
39
38
|
}
|
|
40
39
|
}
|