silgi 0.11.0 → 0.11.2
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/_chunks/index.mjs +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +8 -5
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/runtime/internal/nitro.mjs +1 -2
- package/dist/shared/{silgi.D608K9c5.d.mts → silgi.Cs0ZUUXV.d.mts} +1 -1
- package/dist/shared/{silgi.D608K9c5.d.ts → silgi.Cs0ZUUXV.d.ts} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/core/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, SilgiRuntimeSharedExtends, SilgiEvents, SilgiRuntimeContext, DefaultNamespaces, BaseSchemaType, SilgiRuntimeShareds, StorageConfig, SilgiCLI } from 'silgi/types';
|
|
2
|
-
export { s as silgi } from '../shared/silgi.
|
|
2
|
+
export { s as silgi } from '../shared/silgi.Cs0ZUUXV.mjs';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { Storage, StorageValue } from 'unstorage';
|
|
5
5
|
import * as unctx from 'unctx';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SilgiConfig, Silgi, SilgiOperation, MergedSilgiSchema, ServiceType, SilgiSchema, RequiredServiceType, SilgiRuntimeSharedExtends, SilgiEvents, SilgiRuntimeContext, DefaultNamespaces, BaseSchemaType, SilgiRuntimeShareds, StorageConfig, SilgiCLI } from 'silgi/types';
|
|
2
|
-
export { s as silgi } from '../shared/silgi.
|
|
2
|
+
export { s as silgi } from '../shared/silgi.Cs0ZUUXV.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { Storage, StorageValue } from 'unstorage';
|
|
5
5
|
import * as unctx from 'unctx';
|
package/dist/core/index.mjs
CHANGED
|
@@ -541,12 +541,12 @@ async function createSilgi(config) {
|
|
|
541
541
|
|
|
542
542
|
function silgi(event) {
|
|
543
543
|
return {
|
|
544
|
-
execute: (uriString, input, source) => {
|
|
545
|
-
return execute(uriString, input, event, source);
|
|
544
|
+
execute: (uriString, input, source, queryParams) => {
|
|
545
|
+
return execute(uriString, input, event, source, queryParams);
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
548
|
}
|
|
549
|
-
async function execute(uriString, input, event, source) {
|
|
549
|
+
async function execute(uriString, input, event, source, queryParams) {
|
|
550
550
|
const silgiCtx = useSilgi();
|
|
551
551
|
const config = {
|
|
552
552
|
returnNull: false
|
|
@@ -589,10 +589,13 @@ async function execute(uriString, input, event, source) {
|
|
|
589
589
|
success = cacheData.success;
|
|
590
590
|
cached = cacheData.cached;
|
|
591
591
|
} else {
|
|
592
|
-
|
|
592
|
+
let parameters = defu$1(operation.routerParams, operation.query) || {};
|
|
593
|
+
if (queryParams) {
|
|
594
|
+
parameters = defu$1(queryParams, parameters);
|
|
595
|
+
}
|
|
593
596
|
silgiCtx.shared.silgi = (_event) => silgi(_event || event);
|
|
594
597
|
result = await handler?.handler(
|
|
595
|
-
defu$1({ parameters }
|
|
598
|
+
defu$1(input, { parameters }),
|
|
596
599
|
silgiCtx.shared,
|
|
597
600
|
event,
|
|
598
601
|
source
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
|
@@ -14,9 +14,8 @@ export default async function addNitroApp(silgiCtx = useSilgi()) {
|
|
|
14
14
|
newPath = `${event.path}?method=${event.method}`;
|
|
15
15
|
}
|
|
16
16
|
const data = await silgiConnect.execute(newPath, {
|
|
17
|
-
...query,
|
|
18
17
|
...body
|
|
19
|
-
});
|
|
18
|
+
}, void 0, query);
|
|
20
19
|
if (data) {
|
|
21
20
|
return data;
|
|
22
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SilgiEvents, SilgiURIs, ExtractInputFromURI, ExtractSourceFromURI, ExtractOutputFromURI } from 'silgi/types';
|
|
2
2
|
|
|
3
3
|
declare function silgi(event?: SilgiEvents | Record<string, any>): {
|
|
4
|
-
execute: <TURI extends keyof SilgiURIs>(uriString: TURI, input: ExtractInputFromURI<TURI>, source?: ExtractSourceFromURI<TURI>) => Promise<ExtractOutputFromURI<TURI>>;
|
|
4
|
+
execute: <TURI extends keyof SilgiURIs>(uriString: TURI, input: ExtractInputFromURI<TURI>, source?: ExtractSourceFromURI<TURI>, queryParams?: Record<string, string>) => Promise<ExtractOutputFromURI<TURI>>;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { silgi as s };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SilgiEvents, SilgiURIs, ExtractInputFromURI, ExtractSourceFromURI, ExtractOutputFromURI } from 'silgi/types';
|
|
2
2
|
|
|
3
3
|
declare function silgi(event?: SilgiEvents | Record<string, any>): {
|
|
4
|
-
execute: <TURI extends keyof SilgiURIs>(uriString: TURI, input: ExtractInputFromURI<TURI>, source?: ExtractSourceFromURI<TURI>) => Promise<ExtractOutputFromURI<TURI>>;
|
|
4
|
+
execute: <TURI extends keyof SilgiURIs>(uriString: TURI, input: ExtractInputFromURI<TURI>, source?: ExtractSourceFromURI<TURI>, queryParams?: Record<string, string>) => Promise<ExtractOutputFromURI<TURI>>;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { silgi as s };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ import { Unimport } from 'unimport';
|
|
|
13
13
|
import { Storage, TransactionOptions, BuiltinDriverName, StorageValue } from 'unstorage';
|
|
14
14
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
15
15
|
import { ProviderName } from 'std-env';
|
|
16
|
-
import { s as silgi } from '../shared/silgi.
|
|
16
|
+
import { s as silgi } from '../shared/silgi.Cs0ZUUXV.mjs';
|
|
17
17
|
|
|
18
18
|
type HookResult = Promise<void> | void;
|
|
19
19
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { Unimport } from 'unimport';
|
|
|
13
13
|
import { Storage, TransactionOptions, BuiltinDriverName, StorageValue } from 'unstorage';
|
|
14
14
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
15
15
|
import { ProviderName } from 'std-env';
|
|
16
|
-
import { s as silgi } from '../shared/silgi.
|
|
16
|
+
import { s as silgi } from '../shared/silgi.Cs0ZUUXV.js';
|
|
17
17
|
|
|
18
18
|
type HookResult = Promise<void> | void;
|
|
19
19
|
|