fix(core): update
This commit is contained in:
parent
ab3ae7ec90
commit
697afbaf98
@ -13,31 +13,24 @@ stages:
|
|||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g @shipzone/npmci
|
- pnpm install -g pnpm
|
||||||
|
- pnpm install -g @shipzone/npmci
|
||||||
|
- npmci npm prepare
|
||||||
|
|
||||||
# ====================
|
# ====================
|
||||||
# security stage
|
# security stage
|
||||||
# ====================
|
# ====================
|
||||||
mirror:
|
# ====================
|
||||||
stage: security
|
# security stage
|
||||||
script:
|
# ====================
|
||||||
- npmci git mirror
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
auditProductionDependencies:
|
auditProductionDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --production --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
- npmci command pnpm audit --audit-level=high --prod
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
@ -45,11 +38,10 @@ auditDevDependencies:
|
|||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command npm audit --audit-level=high --only=dev
|
- npmci command pnpm audit --audit-level=high --dev
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
@ -60,7 +52,6 @@ auditDevDependencies:
|
|||||||
testStable:
|
testStable:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@ -71,7 +62,6 @@ testStable:
|
|||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run build
|
- npmci command npm run build
|
||||||
@ -123,7 +113,6 @@ pages:
|
|||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run buildDocs
|
- npmci command npm run buildDocs
|
||||||
tags:
|
tags:
|
||||||
|
@ -40,7 +40,7 @@ tap.test('should products stable jsons', async () => {
|
|||||||
console.log(jsonString);
|
console.log(jsonString);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should work with base64', async() => {
|
tap.test('should work with base64', async () => {
|
||||||
const someObject = {
|
const someObject = {
|
||||||
hi: 'there',
|
hi: 'there',
|
||||||
thisIs: 'awesome',
|
thisIs: 'awesome',
|
||||||
@ -55,8 +55,8 @@ tap.test('should work with base64', async() => {
|
|||||||
tap.test('stringify should handle plain string', async () => {
|
tap.test('stringify should handle plain string', async () => {
|
||||||
const stringifiedString = smartjson.stringify('hello');
|
const stringifiedString = smartjson.stringify('hello');
|
||||||
console.log(stringifiedString);
|
console.log(stringifiedString);
|
||||||
expect(stringifiedString).toEqual('"hello"')
|
expect(stringifiedString).toEqual('"hello"');
|
||||||
expect(smartjson.parse(stringifiedString)).toEqual('hello');
|
expect(smartjson.parse(stringifiedString)).toEqual('hello');
|
||||||
})
|
});
|
||||||
|
|
||||||
tap.start();
|
tap.start();
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartjson',
|
name: '@pushrocks/smartjson',
|
||||||
version: '5.0.3',
|
version: '5.0.4',
|
||||||
description: 'typed json handlers'
|
description: 'typed json handlers'
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,14 @@ export const stringify = (
|
|||||||
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
|
export const stringifyBase64 = (...args: Parameters<typeof stringify>): string => {
|
||||||
const stringifiedResult = stringify(...args);
|
const stringifiedResult = stringify(...args);
|
||||||
return plugins.smartstring.base64.encodeUri(stringifiedResult);
|
return plugins.smartstring.base64.encodeUri(stringifiedResult);
|
||||||
}
|
};
|
||||||
|
|
||||||
export const parseBase64 = (base64JsonStringArg: string) => {
|
export const parseBase64 = (base64JsonStringArg: string) => {
|
||||||
const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg);
|
const simpleStringified = plugins.smartstring.base64.decode(base64JsonStringArg);
|
||||||
return parse(simpleStringified);
|
return parse(simpleStringified);
|
||||||
}
|
};
|
||||||
|
|
||||||
parse
|
parse;
|
||||||
|
|
||||||
export class Smartjson {
|
export class Smartjson {
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartstring from '@pushrocks/smartstring';
|
import * as smartstring from '@pushrocks/smartstring';
|
||||||
|
|
||||||
export {
|
export { smartstring };
|
||||||
smartstring
|
|
||||||
}
|
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import lodashCloneDeep from 'lodash.clonedeep';
|
import lodashCloneDeep from 'lodash.clonedeep';
|
||||||
|
Loading…
Reference in New Issue
Block a user