Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@psdk/frame-father

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@psdk/frame-father - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

28

build/father/command/print/command.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -11,2 +34,3 @@ exports.DefaultCommand = exports.BasicCommand = void 0;

const toolkit_1 = require("../../../toolkit");
const iconv = __importStar(require("iconv-lite"));
class BasicCommand {

@@ -28,4 +52,4 @@ base64() {

//# use gbk encoding
// const t_buffer = iconv.encode(t, clause.charset ?? PsdkConst.DEF_CHARSET);
const t_buffer = toolkit_1.FastGBK.encode(t);
const t_buffer = iconv.encode(t, clause.charset ?? types_1.PsdkConst.DEF_CHARSET);
// const t_buffer = FastGBK.encode(t);
const t_binary = Array.prototype.slice.call(t_buffer, 0);

@@ -32,0 +56,0 @@ bytes = bytes.concat(t_binary);

@@ -0,1 +1,4 @@

/**
* Binary command
*/
import { CommandClause } from "../print/command_clause";

@@ -2,0 +5,0 @@ export declare class BinaryCommand {

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BinaryCommand = void 0;
/**
* Binary command
*/
const command_clause_1 = require("../print/command_clause");
// import * as iconv from 'iconv-lite';
const toolkit_1 = require("../../../toolkit");
const types_1 = require("../../types");
const iconv = __importStar(require("iconv-lite"));
// import {FastGBK} from "../../../toolkit";
class BinaryCommand {

@@ -24,5 +51,5 @@ binary;

appendText(text, charset) {
// const encoding = (charset ?? PsdkConst.DEF_CHARSET).toLowerCase();
// const binary = iconv.encode(text, encoding);
const binary = toolkit_1.FastGBK.encode(text);
const encoding = (charset ?? types_1.PsdkConst.DEF_CHARSET).toLowerCase();
const binary = iconv.encode(text, encoding);
// const binary = FastGBK.encode(text);
this.binary.push(...binary);

@@ -29,0 +56,0 @@ return this;

@@ -5,2 +5,3 @@ 'use strict';

// https://github.com/EtherDream/str2gbk/blob/main/index.js
//# Only support TextDecoder can use this class
let table;

@@ -7,0 +8,0 @@ function initGbkTable() {

7

package.json
{
"name": "@psdk/frame-father",
"version": "0.5.6",
"version": "0.5.7",
"description": "psdk",
"main": "build/index.js",
"main": "dist/index.js",
"types": "build/index.d.ts",

@@ -20,2 +20,3 @@ "scripts": {

"@vercel/ncc": "^0.38.1",
"iconv-lite": "^0.6.3",
"jest": "^29.7.0",

@@ -31,3 +32,3 @@ "ts-jest": "^29.1.5",

],
"gitHead": "0cd3db525a6083a8a1b6c9124599aea41e86196d"
"gitHead": "dfce96c5ea869cafacb6e007e3f33832156a77ec"
}

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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc