@microsoft/kiota-serialization-text
Advanced tools
Comparing version 1.0.0-preview.48 to 1.0.0-preview.49
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./../textParseNode"; | ||
@@ -2,0 +8,0 @@ export * from "./../textSerializationWriter"; |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./../textParseNode"; | ||
@@ -5,1 +11,2 @@ export * from "./../textSerializationWriter"; | ||
export * from "./../textSerializationWriterFactory"; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import type { ParseNode, ParseNodeFactory } from "@microsoft/kiota-abstractions"; | ||
@@ -2,0 +8,0 @@ export declare class TextParseNodeFactory implements ParseNodeFactory { |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { TextParseNode } from "./../textParseNode"; | ||
@@ -23,1 +29,2 @@ export class TextParseNodeFactory { | ||
} | ||
//# sourceMappingURL=textParseNodeFactory.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./textParseNode"; | ||
@@ -2,0 +8,0 @@ export * from "./textSerializationWriter"; |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
export * from "./textParseNode"; | ||
@@ -5,1 +11,2 @@ export * from "./textSerializationWriter"; | ||
export * from "./textSerializationWriterFactory"; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { DateOnly, Duration, type Parsable, type ParsableFactory, type ParseNode, TimeOnly } from "@microsoft/kiota-abstractions"; | ||
@@ -2,0 +8,0 @@ export declare class TextParseNode implements ParseNode { |
@@ -1,2 +0,8 @@ | ||
import { DateOnly, Duration, parseGuidString, TimeOnly, toFirstCharacterUpper, } from "@microsoft/kiota-abstractions"; | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { DateOnly, Duration, parseGuidString, TimeOnly, toFirstCharacterUpper, inNodeEnv } from "@microsoft/kiota-abstractions"; | ||
export class TextParseNode { | ||
@@ -40,6 +46,3 @@ /** | ||
}; | ||
if (this.text && | ||
this.text.length > 1 && | ||
this.text.charAt(0) === '"' && | ||
this.text.charAt(this.text.length - 1) === '"') { | ||
if (this.text && this.text.length > 1 && this.text.charAt(0) === '"' && this.text.charAt(this.text.length - 1) === '"') { | ||
this.text = this.text.substring(1, this.text.length - 2); | ||
@@ -51,3 +54,3 @@ } | ||
if (strValue && strValue.length > 0) { | ||
return Buffer.from(strValue, "base64").buffer; | ||
return inNodeEnv() ? Buffer.from(strValue, "base64").buffer : new TextEncoder().encode(strValue); | ||
} | ||
@@ -66,1 +69,2 @@ return undefined; | ||
TextParseNode.noStructuredDataMessage = "text does not support structured data"; | ||
//# sourceMappingURL=textParseNode.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import type { ParseNode, ParseNodeFactory } from "@microsoft/kiota-abstractions"; | ||
@@ -2,0 +8,0 @@ export declare class TextParseNodeFactory implements ParseNodeFactory { |
@@ -1,2 +0,7 @@ | ||
import { TextDecoder } from "util"; | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { TextParseNode } from "./textParseNode"; | ||
@@ -24,1 +29,2 @@ export class TextParseNodeFactory { | ||
} | ||
//# sourceMappingURL=textParseNodeFactory.js.map |
@@ -1,2 +0,8 @@ | ||
import type { DateOnly, Duration, ModelSerializerFunction, Parsable, SerializationWriter, TimeOnly } from "@microsoft/kiota-abstractions"; | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { type DateOnly, type Duration, type ModelSerializerFunction, type Parsable, type SerializationWriter, type TimeOnly } from "@microsoft/kiota-abstractions"; | ||
import type { Guid } from "guid-typescript"; | ||
@@ -3,0 +9,0 @@ export declare class TextSerializationWriter implements SerializationWriter { |
@@ -0,1 +1,9 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import { inNodeEnv } from "@microsoft/kiota-abstractions"; | ||
export class TextSerializationWriter { | ||
@@ -78,5 +86,3 @@ constructor() { | ||
if (values.length > 0) { | ||
const rawValues = values | ||
.filter((x) => x !== undefined) | ||
.map((x) => `${x}`); | ||
const rawValues = values.filter((x) => x !== undefined).map((x) => `${x}`); | ||
if (rawValues.length > 0) { | ||
@@ -104,3 +110,3 @@ this.writeStringValue(key, rawValues.reduce((x, y) => `${x}, ${y}`)); | ||
} | ||
const b64 = Buffer.from(value).toString("base64"); | ||
const b64 = inNodeEnv() ? Buffer.from(value).toString("base64") : btoa(new TextDecoder().decode(value)); | ||
this.writeStringValue(key, b64); | ||
@@ -110,1 +116,2 @@ } | ||
TextSerializationWriter.noStructuredDataMessage = "text does not support structured data"; | ||
//# sourceMappingURL=textSerializationWriter.js.map |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import type { SerializationWriter, SerializationWriterFactory } from "@microsoft/kiota-abstractions"; | ||
@@ -2,0 +8,0 @@ export declare class TextSerializationWriterFactory implements SerializationWriterFactory { |
@@ -0,1 +1,7 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
import { TextSerializationWriter } from "./textSerializationWriter"; | ||
@@ -16,1 +22,2 @@ export class TextSerializationWriterFactory { | ||
} | ||
//# sourceMappingURL=textSerializationWriterFactory.js.map |
{ | ||
"name": "@microsoft/kiota-serialization-text", | ||
"version": "1.0.0-preview.48", | ||
"description": "Implementation of Kiota Serialization interfaces for text", | ||
"main": "dist/cjs/src/index.js", | ||
"browser": { | ||
"./dist/es/src/index.js": "./dist/es/src/browser/index.js", | ||
"./dist/es/src/textParseNodeFactory.js": "./dist/es/src/browser/textParseNodeFactory.js" | ||
}, | ||
"module": "dist/es/src/index.js", | ||
"types": "dist/cjs/src/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -b tsconfig.cjs.json", | ||
"build:esm": "tsc -b tsconfig.es.json", | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"clean": "rm -r ./dist ./node_modules", | ||
"karma": "npm run rollup && karma start --single-run --browsers ChromeHeadless karma.conf.js", | ||
"rollup": "rollup -c", | ||
"test": "npm run test:cjs && npm run rollup && npm run karma", | ||
"test:cjs": "npm run build && mocha 'dist/cjs/test/common/**/*.js'" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/microsoft-typescript/kiota.git" | ||
}, | ||
"keywords": [ | ||
"kiota", | ||
"openAPI", | ||
"Microsoft", | ||
"Graph", | ||
"text" | ||
], | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/microsoft/kiota-typescript/issues" | ||
}, | ||
"homepage": "https://github.com/microsoft/kiota-typescript#readme", | ||
"dependencies": { | ||
"@microsoft/kiota-abstractions": "^1.0.0-preview.51", | ||
"guid-typescript": "^1.0.9", | ||
"tslib": "^2.6.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "8b6e35c21fdd163b9412bbb7e7fcdf11d475eaab" | ||
"name": "@microsoft/kiota-serialization-text", | ||
"version": "1.0.0-preview.49", | ||
"description": "Implementation of Kiota Serialization interfaces for text", | ||
"main": "dist/es/src/index.js", | ||
"browser": { | ||
"./dist/es/src/index.js": "./dist/es/src/browser/index.js", | ||
"./dist/es/src/textParseNodeFactory.js": "./dist/es/src/browser/textParseNodeFactory.js" | ||
}, | ||
"module": "dist/es/src/index.js", | ||
"types": "dist/es/src/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:esm", | ||
"build:esm": "tsc", | ||
"lint": "eslint . --ext .ts", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"clean": "rm -rf ./dist", | ||
"test:browser": "vitest run --browser.name=chrome --browser.headless", | ||
"test:node": "vitest --run", | ||
"test": "npm run test:node && npm run test:browser" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/microsoft-typescript/kiota.git" | ||
}, | ||
"keywords": [ | ||
"kiota", | ||
"openAPI", | ||
"Microsoft", | ||
"Graph", | ||
"text" | ||
], | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/microsoft/kiota-typescript/issues" | ||
}, | ||
"homepage": "https://github.com/microsoft/kiota-typescript#readme", | ||
"dependencies": { | ||
"@microsoft/kiota-abstractions": "*", | ||
"guid-typescript": "^1.0.9", | ||
"tslib": "^2.6.2" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "395b1b29ee2dcdd4a0f03a5222c506b02f449164" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82450
34
403
1
- Removed@microsoft/kiota-abstractions@1.0.0-preview.66(transitive)
- Removed@opentelemetry/api@1.9.0(transitive)
- Removed@std-uritemplate/std-uritemplate@1.0.6(transitive)
- Removedtinyduration@3.3.1(transitive)
- Removeduuid@10.0.0(transitive)